public ServerGUI() { InitializeComponent(); CreateIECServer(); server = new HostServer(IEC61850Server); server.ServerConnected += new Connected (this.GotConnected); server.ServerDataReceived += new DataReceived (this.GotConnected); server.Start(); FillTreewithIECModel(); this.txtLogInfo.Text = server.CurrentLog; }
public ServerGUI() { InitializeComponent(); CreateIECServer(); server = new HostServer(IEC61850Server); server.ServerConnected += new Connected(this.GotConnected); server.ServerDataReceived += new DataReceived(this.GotConnected); server.Start(); FillTreewithIECModel(); this.txtLogInfo.Text = server.CurrentLog; }
/// <summary> /// Setup the callback for recieved data and loss of conneciton /// </summary> /// <param name="app"></param> public void SetupRecieveCallback(HostServer app) { try { AsyncCallback recieveData = new AsyncCallback(app.OnReecieveData); m_sock.BeginReceive(m_byBuff, 0, m_byBuff.Length, SocketFlags.None, recieveData, this); } catch (Exception ex) { Console.WriteLine("Recieve callback setup failed! {0}", ex.Message); } }