Esempio n. 1
0
        public TcpReceiver(IPAddress address, int port, TcpClientProvider provider, string logName, int index)
        {
            _address = address;
            _port = port;
            _provider = provider;
            _index = index;

            _client = new TcpClient(address, port, provider, logName);
            provider.Client = _client;

            _starterCallBack = new WaitCallback(StarterCallBack_Handler);
        }
Esempio n. 2
0
        public TcpClient(IPAddress serverAddress, int port, TcpClientProvider provider, string logName)
        {
            _tc = new System.Net.Sockets.TcpClient();

            _tc.ReceiveBufferSize = 1024;
            _tc.ReceiveTimeout = 5000;

            _tc.SendBufferSize = 1024;
            _tc.SendTimeout = 5000;

            _serverAddress = serverAddress;
            _port = port;
            _provider = provider;

            LOGNAME = logName;
        }