コード例 #1
0
 def handleJoinRoomPayload(self, data):
     payload = protocol_pb2.Room()
     if (payload.ParseFromString(data) == False):
         #TODO: ERROR
         return
     self.handleJoinRoomRequest(payload.userName, payload.room,
                                payload.nickname, payload.password)
コード例 #2
0
ファイル: backend.py プロジェクト: synchrotalk/transwhat
	def handleRoomNicknameChanged(self, user, r, nickname):
		room = protocol_pb2.Room()
		room.userName = user
		room.nickname = nickname
		room.room = r
		room.password = ""

		message = WRAP(room.SerializeToString(), protocol_pb2.WrapperMessage.TYPE_ROOM_NICKNAME_CHANGED)
		self.send(message);
コード例 #3
0
 def handleLeaveRoomPayload(self, data):
     payload = protocol_pb2.Room()
     if (payload.ParseFromString(data) == False):
         #TODO: ERROR
         return
     self.handleLeaveRoomRequest(payload.userName, payload.room)