We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
聊天模块的基础类,它负责提供创建对话,发送消息,接收消息等接口
建议全局使用默认提供的单例模式
RxAVRealtime.sharedInstance.connect(clientId: "junwu").subscribe(onNext: { success in print(success)// true 则表示连接聊天服务器成功 })
try! RxAVRealtime.sharedInstance.connect(clientId: "junwu").flatMap { (connected) -> Observable<IAVIMConversation> in let conversation = AVIMConversation(members: ["hey"], creator: "junwu") return try RxAVRealtime.sharedInstance.create(options: AVIMConversationCreateOptions(conversation: conversation)) }.subscribe(onNext: { conversation in print(conversation.conversationId) })
try! RxAVRealtime.sharedInstance.connect(clientId: "junwu").flatMap { (connected) -> Observable<IAVIMConversation> in let conversation = AVIMConversation(members: ["hey"], creator: "junwu") return try RxAVRealtime.sharedInstance.create(options: AVIMConversationCreateOptions(conversation: conversation)) }.flatMap({ (conversation) -> Observable<IAVIMMessage> in return try RxAVRealtime.sharedInstance.send(conversationId: conversation.conversationId, jsonData: ["type": "text", "text": "hello world"]) }).subscribe(onNext: { message in print(message.id) })
try! RxAVRealtime.sharedInstance.connect(clientId: "junwu").flatMap { (connected) -> Observable<IAVIMMessage> in return RxAVRealtime.sharedInstance.onMessage }.subscribe(onNext: { message in print(message.id, message.raw) })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
RxAVRealtime
聊天模块的基础类,它负责提供创建对话,发送消息,接收消息等接口
RxAVRealtime.sharedInstance
建议全局使用默认提供的单例模式
登录到聊天服务器
创建对话
发送消息
接收消息
The text was updated successfully, but these errors were encountered: