Example #1
0
 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);
     }
 }
Example #2
0
    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;
        }

    }
Example #3
0
 public void ErrorClient(SocketBase socket, Exception exception)
 {
     _connect_state = u3dclient_state.disconnect;
     //global_instance.Instance._client_session.addmsg(Consts.NetworkError, new System.IO.MemoryStream());
 }