public ProxyClient(Socket mSock, Dictionary<ushort, Packet> mCommandTable, string ip, int port, List<Packet> clientp,List<Packet> serverp,List<Packet> p,ushort lv1len) { this.netIO = new NetIO(mSock, mCommandTable, this, ProxyClientManager.Instance); this.netIO.FirstLevelLength = lv1len; this.firstlevel = lv1len; this.packetContainer = clientp; this.packetContainerServer = serverp; this.packets = p; session = new ServerSession(ip, port, this); //session = new ServerSession("203.174.58.144", 12000, this); this.netIO.SetMode(NetIO.Mode.Server); if (this.netIO.sock.Connected) this.OnConnect(); }
public ProxyClient(Socket mSock, Dictionary <ushort, Packet> mCommandTable, string ip, int port, List <Packet> clientp, List <Packet> serverp, List <Packet> p, ushort lv1len) { this.netIO = new NetIO(mSock, mCommandTable, this, ProxyClientManager.Instance); this.netIO.FirstLevelLength = lv1len; this.firstlevel = lv1len; this.packetContainer = clientp; this.packetContainerServer = serverp; this.packets = p; session = new ServerSession(ip, port, this); //session = new ServerSession("203.174.58.144", 12000, this); this.netIO.SetMode(NetIO.Mode.Server); if (this.netIO.sock.Connected) { this.OnConnect(); } }