コード例 #1
0
ファイル: ServerGUI.cs プロジェクト: s9703830/SmartVillage
 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
ファイル: ServerGUI.cs プロジェクト: ttgzs/SmartVillage
 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
ファイル: HostServer.cs プロジェクト: s9703830/SmartVillage
 /// <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);
     }
 }