コード例 #1
0
ファイル: Doraemon.cs プロジェクト: code1w/tomnet-csharp
        public void OnLoginOk(INetWorkClient conn, object message)
        {
            Tom.LoginOk rsp = (Tom.LoginOk)message;
            Console.WriteLine(rsp.PlayerBaseInfo.Name + "  " + rsp.PlayerBaseInfo.PlayerID);

            Tom.ReqLogin req = new Tom.ReqLogin();
            req.Account  = "zxb-1";
            req.Passward = "123-456-11111";
            SendPbMsg(req);
        }
コード例 #2
0
ファイル: Doraemon.cs プロジェクト: code1w/Tomnet-Unity-Demo
 private void Initialize(bool debug)
 {
     if (!inited)
     {
         dispatcher = new EventDispatcher(this);
         network    = new TcpNetWorkClinet(new ProtobufProtocol());
         if (network != null)
         {
             network.Initialize();
             RegisterNetWorkEvent();
         }
         inited = true;
     }
 }
コード例 #3
0
 public IController(INetWorkClient network)
 {
     this.network = network;
     Callbacks    = new Dictionary <string, RequestProtoBufDelegate>();
 }
コード例 #4
0
 public NetWorkIOHandler(INetWorkClient network)
 {
     this.network  = network;
     this.protocol = network.Protocol;
 }
コード例 #5
0
 public ProtobufController(INetWorkClient network) : base(network)
 {
 }
コード例 #6
0
 public DefaultController(INetWorkClient network) : base(network)
 {
 }
コード例 #7
0
ファイル: Doraemon.cs プロジェクト: code1w/tomnet-csharp
 public void OnReqLogin(INetWorkClient conn, object message)
 {
     Tom.ReqLogin rsp = (Tom.ReqLogin)message;
     Console.WriteLine(rsp.Account + "  " + rsp.Passward);
 }
コード例 #8
0
 public TcpSocket(INetWorkClient bs)
 {
     networkclient = bs;
     recvbuf_      = new ByteBuffer();
     InitStates();
 }