예제 #1
0
        public JClient()
        {
            _jUnpacker = new JUnpacker();

            _client = new TCPClient <JUnpacker>("127.0.0.1", 39808);

            _client.OnError += _client_OnError;

            _client.OnDisconnect += _client_OnDisconnect;

            _client.OnReceive += _client_OnReceive;
        }
예제 #2
0
        public JClient2()
        {
            _jUnpacker = new JUnpacker();

            _client = new TCPClient <JUnpacker>("127.0.0.1", 39808);

            _client.OnError += _client_OnError;

            _client.OnDisconnect += _client_OnDisconnect;

            _data = new List <JT808Package>();
        }
예제 #3
0
        public JClient()
        {
            _jUnpacker = new JUnpacker();

            _clientSokcet = SocketFactory.CreateClientSocket(SocketOptionBuilder.Instance
                                                             .SetSocket(Model.SAEASocketType.Tcp)
                                                             .SetIPEndPoint(new System.Net.IPEndPoint(System.Net.IPAddress.Parse("127.0.0.1"), 39808))
                                                             .UseIocp <JContext>()
                                                             .Build());

            _clientSokcet.OnReceive      += ClientSokcet_OnReceive;
            _clientSokcet.OnDisconnected += ClientSokcet_OnDisconnected;
            _clientSokcet.OnError        += ClientSokcet_OnError;
        }