public UdpServerBase(int id = -1, SendType type = SendType.Normal) { _id = id; _sendType = type; _isEndConnection = true; _callBackFunc = null; _functions = new InterfaceFunctions(this, _queue); }
public UdpClientBase(int id = -1, SendType type = SendType.Normal) : base() { _id = id; _sendType = type; _isEndConnection = true; _callBackFunc = null; _queue = new BufferQueue(); _functions = new InterfaceFunctions(this, _queue); }
void init(int id) { _server = 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(); }
public TcpServerBase(int id, SendType type = SendType.Normal) { _id = id; _listener = null; _sendType = type; //_sh = null; _client = null; _isEndServer = true; _isEndConnection = true; _callBackFunc = null; _queue = new BufferQueue(); _functions = new InterfaceFunctions(this, _queue); }