LCWebSocketManager.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // LCWebSocketManager.h
  3. // LiveChat
  4. //
  5. // Created by 张灿 on 2018/9/17.
  6. // Copyright © 2018年 caicai. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "UCWebSocketSever.h"
  10. #import "UCSocketParmaModel.h"
  11. @protocol LCWebMagagerDelegate <NSObject>
  12. @optional
  13. - (void)requestSuccess;
  14. - (void)responseConnent;
  15. - (void)responseChoosing:(NSString*)tip;
  16. - (void)videoStart:(NSDictionary*)dict;
  17. - (void)videoEnd:(NSInteger)type;
  18. - (void)reciveTxt:(NSDictionary*)dict;
  19. //add by leo 20191031 更新剩余可通话时长
  20. - (void)canCallTime:(NSString*)tip;
  21. // 对方剩余钻石
  22. - (void)otherBalance:(NSInteger)balance;
  23. // 已减免时长
  24. - (void)discountWithTime:(NSInteger)time;
  25. - (void)autoHangUp;
  26. @end
  27. @interface LCWebSocketManager : NSObject<webSocketDidRecvMessageDelegate>
  28. //@property(nonatomic,strong)UCWebSocketSever* socketServer;
  29. @property(nonatomic,weak)id<LCWebMagagerDelegate> delegate;
  30. @property(nonatomic,strong)NSString* roomId;
  31. - (instancetype)initWithDelegate:(id)delegate serverUrl:(NSString*)url roomId:(NSString*)roomId;
  32. - (void)stopConnect;
  33. //发送呼叫请求
  34. - (void)sendCancel;
  35. //拒绝视频通话
  36. - (void)sendRefuse;
  37. //接受视频通话
  38. - (void)sendAgree;
  39. //type为1代表文本消息
  40. - (void)sendChat:(NSInteger)type content:(NSString*)content;
  41. //发送礼物消息
  42. - (void)sendGift:(NSString*)giftId count:(NSInteger)giftCount tyID:(NSString*)gift_type_id;
  43. //挂断
  44. - (void)sendHangup;
  45. // 减免
  46. - (void)discountWithTimerId:(NSString *)timerId;
  47. @end