Example #1
0
        public NcsMain(string ip, int port, Form1 form)
        {
            NcsTemplateBuffer.SetTempBuffer();

            tcpSession = new AsyncTcpSession(new IPEndPoint(IPAddress.Parse(ip), port));

            tcpSession.Connected    += tcpSession_Connected;
            tcpSession.Closed       += tcpSession_Closed;
            tcpSession.DataReceived += tcpSession_DataReceived;
            tcpSession.Error        += new EventHandler <ErrorEventArgs>(tcpSession_Error);
            tcpSession.Connect();
        }
Example #2
0
        public NcsMain(IPEndPoint ipEndPoint, Form1 form)
        {
            NcsTemplateBuffer.SetTempBuffer();

            tcpSession = new AsyncTcpSession(ipEndPoint);

            tcpSession.Connected    += tcpSession_Connected;
            tcpSession.Closed       += tcpSession_Closed;
            tcpSession.DataReceived += tcpSession_DataReceived;
            tcpSession.Error        += new EventHandler <ErrorEventArgs>(tcpSession_Error);
            tcpSession.Connect();
        }
Example #3
0
        public NcsMain(Form1 form)
        {
            NcsTemplateBuffer.SetTempBuffer();

            tcpSession = new AsyncTcpSession(new IPEndPoint(IPAddress.Parse("192.168.0.17"), 65535));

            tcpSession.Connected    += tcpSession_Connected;
            tcpSession.Closed       += tcpSession_Closed;
            tcpSession.DataReceived += tcpSession_DataReceived;
            tcpSession.Error        += new EventHandler <ErrorEventArgs>(tcpSession_Error);
            tcpSession.Connect();
        }