public UdpServerBase(int id, SendType type = SendType.Normal) { _tempRecvBuffer = new byte[1024000];//1MByte _id = id; _sendType = type; _isEndConnection = true; _callBackFunc = null; _functions = new InterfaceFunctions(this, _queue); }
public UdpClientBase(int id = -1, SendType type = SendType.Normal) : base() { _tempRecvBuffer = new byte[1024000];//1MByte _id = id; _sendType = type; //_isEndConnection = true; _callBackFunc = null; _queue = new BufferQueue(); _functions = new InterfaceFunctions(this, _queue); }
public UdpServerBase(Byte[] tempRecvBuffer, SendType type = SendType.Normal, int id = -1) : base() { _tempRecvBuffer = tempRecvBuffer; _id = id; _sendType = type; _isEndConnection = true; _callBackFunc = null; _queue = new BufferQueue(); _functions = new InterfaceFunctions(this, _queue); }
void init(int id) { //_nowConn = new TcpClient(); _id = id; _functions = new InterfaceFunctions(this, _queue); //_sh = null; //_isEndConnection = true; /* * _connectionTimer = new System.Timers.Timer(); * _connectionTimer.Interval = 1000; * _connectionTimer.Elapsed += new Timers.ElapsedEventHandler(_connectionTimer_Elapsed); * _connectionTimer.Start(); */ }
void init(SendType type, int clients) { _listener = null; _sendType = type; _totalSize = new int[clients]; //_sh = null; _client = new TcpClient[clients]; _recvThreads = new Thread[clients]; _isEndServer = true; _isEndConnection = new bool[clients]; _callBackFunc = null; _queue = new BufferQueue[clients]; _functions = new InterfaceFunctions[clients]; for (int i = 0; i < clients; i++) { _client[i] = null; _queue[i] = new BufferQueue(); _functions[i] = new InterfaceFunctions(this, _queue[i]); _totalSize[i] = 0; _isEndConnection[i] = false; } }