public void MessageClient(SocketBase socket, int iNumberOfBytes) { try { SocketClient pSocket = ((SocketClient)socket); Byte[] bytes = new Byte[iNumberOfBytes]; Array.Copy(socket.MsgBuffer, bytes, iNumberOfBytes); callFunction(bytes, pSocket); } catch (Exception pException) { Debug.Log(pException.Message); } }
public void on_connect(SocketBase socket) { switch (_connect_state) { case u3dclient_state.connect_gate: { LoginGame msg = new LoginGame(); msg.user_account = (uint)_user_account; send(msg); } break; } }
public void ErrorClient(SocketBase socket, Exception exception) { _connect_state = u3dclient_state.disconnect; //global_instance.Instance._client_session.addmsg(Consts.NetworkError, new System.IO.MemoryStream()); }