コード例 #1
0
 public UdpServerBase(int id = -1, SendType type = SendType.Normal)
 {
     _id              = id;
     _sendType        = type;
     _isEndConnection = true;
     _callBackFunc    = null;
     _functions       = new InterfaceFunctions(this, _queue);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
        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();
        }
コード例 #4
0
 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);
 }