public Future<JoinRoomResponse> JoinOrCreateRoom( String roomName ) { var request = MessageFactory.New< IChatServiceJoinOrCreateRoomRequest >(); request.roomName=roomName; var finalFuture = new Future< JoinRoomResponse >(); ExecuteOperation(request, (replyMsg) => finalFuture.SetResult( ((IChatServiceJoinOrCreateRoomReply)replyMsg).RetVal), (errorCode, errorDesc) => finalFuture.SetError(errorCode, errorDesc)); return finalFuture; }
public Future<List<String>> Join( Int64 ticket ) { var request = MessageFactory.New< IChatRoomServiceJoinRequest >(); request.ticket=ticket; var finalFuture = new Future< List<String> >(); ExecuteOperation(request, (replyMsg) => finalFuture.SetResult( ((IChatRoomServiceJoinReply)replyMsg).RetVal), (errorCode, errorDesc) => finalFuture.SetError(errorCode, errorDesc)); return finalFuture; }
public Future<List<String>> GetRooms( ) { var request = MessageFactory.New< IChatServiceGetRoomsRequest >(); var finalFuture = new Future< List<String> >(); ExecuteOperation(request, (replyMsg) => finalFuture.SetResult( ((IChatServiceGetRoomsReply)replyMsg).RetVal), (errorCode, errorDesc) => finalFuture.SetError(errorCode, errorDesc)); return finalFuture; }
public Future<LoginResult> Login( String name ) { var request = MessageFactory.New< IChatLoginLoginRequest >(); request.name=name; var finalFuture = new Future< LoginResult >(); ExecuteOperation(request, (replyMsg) => finalFuture.SetResult( ((IChatLoginLoginReply)replyMsg).RetVal), (errorCode, errorDesc) => finalFuture.SetError(errorCode, errorDesc)); return finalFuture; }