public SprotoTcpSocket(SprotoMgr S2C, SprotoMgr C2S) { this.TcpSocket = new TcpClientSocket(); this.TcpSocket.Register(this._OnConnect, this._OnClose, this._OnMessage, this._Log); this.Dispatcher = new ProtoDispatcher(); this.Proto = new SprotoRpc(S2C, C2S); }
public SprotoTcpSocket(string s2cfile, string c2sfile, bool isbinary = false) { this.TcpSocket = new TcpClientSocket(); this.TcpSocket.Register(this._OnConnect, this._OnClose, this._OnMessage, this._Log); this.Dispatcher = new ProtoDispatcher(); SprotoMgr S2C = SprotoParser.ParseFile(s2cfile); SprotoMgr C2S = SprotoParser.ParseFile(c2sfile); this.Proto = new SprotoRpc(S2C, C2S); }