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); }
private void Initialize(bool debug) { if (!inited) { dispatcher = new EventDispatcher(this); network = new TcpNetWorkClinet(new ProtobufProtocol()); if (network != null) { network.Initialize(); RegisterNetWorkEvent(); } inited = true; } }
public IController(INetWorkClient network) { this.network = network; Callbacks = new Dictionary <string, RequestProtoBufDelegate>(); }
public NetWorkIOHandler(INetWorkClient network) { this.network = network; this.protocol = network.Protocol; }
public ProtobufController(INetWorkClient network) : base(network) { }
public DefaultController(INetWorkClient network) : base(network) { }
public void OnReqLogin(INetWorkClient conn, object message) { Tom.ReqLogin rsp = (Tom.ReqLogin)message; Console.WriteLine(rsp.Account + " " + rsp.Passward); }
public TcpSocket(INetWorkClient bs) { networkclient = bs; recvbuf_ = new ByteBuffer(); InitStates(); }