internal ConClient(string host, int port, int maxBuffLength) { BufferQueue = new ZYNetRingBufferPool(maxBuffLength); this.Host = host; this.Port = port; Sock = new SocketClient(); Sock.ConnInput += new ConnectionHandler(Connection); Sock.BinaryInput += new ClientBinaryInputHandler(DataIn); Sock.MessageInput += new ClientMessageInputHandler(ExpInput); }
public ZYNetClient(ushort minport, ushort maxport, int bufferPoolLength) { BufferPoolLength = bufferPoolLength; BufferFormat.ObjFormatType = BuffFormatType.protobuf; ReadBytes.ObjFormatType = BuffFormatType.protobuf; ConnUserList = new ConcurrentDictionary <long, SessionObj>(); UserMaskList = new ConcurrentQueue <long>(); BufferQueue = new ZYNetRingBufferPool(BufferPoolLength); BindPort = new Random().Next(minport, maxport); ResetConnt = 1; Group = 0; }
public ZYNetClient() { BufferPoolLength = 1024 * 1024 * 2; BufferFormat.ObjFormatType = BuffFormatType.protobuf; ReadBytes.ObjFormatType = BuffFormatType.protobuf; ConnUserList = new ConcurrentDictionary <long, SessionObj>(); UserMaskList = new ConcurrentQueue <long>(); BufferQueue = new ZYNetRingBufferPool(BufferPoolLength); BindPort = new Random().Next(1000, 60000); ResetConnt = 1; Group = 0; }