예제 #1
0
 public void NotifyConnections(IndicatorLink link, bool hasOpened)
 {
     if (hasOpened)
     {
         Console.WriteLine(@"Connection from " + link.ClientSocket.RemoteEndPoint + @" established.");
     }
     else
     {
         Console.WriteLine(@"Connection from " + link.ClientSocket.RemoteEndPoint + @" terminated.");
     }
 }
예제 #2
0
 /// <summary>
 /// Notify that this indicator is now connected.  This is called
 /// once, at the beginning of a connection.  Indicators are not
 /// reused.
 /// </summary>
 /// <param name="theLink">The link.</param>
 public void NotifyConnect(IndicatorLink theLink)
 {
     _link = theLink;
     if (ErrorMessage != null)
     {
         String[] args = { ErrorMessage };
         Link.WritePacket(IndicatorLink.PacketError, args);
     }
     else
     {
         _link.InitConnection(_dataRequested, _blocking);
     }
 }