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(); }
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(); }
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(); }