示例#1
0
 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;
 }
示例#2
0
 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;
 }
示例#3
0
 /// <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);
     }
 }
示例#4
0
 /// <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);
     }
 }