예제 #1
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public WinsockServerActuatorBase()
 {
     _socketServer = null;
 }
예제 #2
0
        /// <summary>
        /// Initializes the socket server object and subscribes to events
        /// </summary>
        private void initSocketInterface()
        {
            if (ServerListenPort > 0)
            {
                _socketServer = new SocketServer(ServerListenPort);

                _socketServer.OnPacketReceived += _socketServer_OnPacketReceived;
                _socketServer.OnClientConnected += _socketServer_OnClientConnected;
                _socketServer.OnClientDisconnected += _socketServer_OnClientDisconnected;
                _socketServer.Start();
            }
            else
            {
                Log.Debug("Listen error.  Listen port not set");
            }
        }
예제 #3
0
 /// <summary>
 /// Uninitialize.  Stop socket server
 /// </summary>
 /// <returns>true</returns>
 private void unInit()
 {
     if (_socketServer != null)
     {
         _socketServer.Stop();
         _socketServer = null;
     }
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public WinsockServerActuatorBase()
 {
     _socketServer = null;
 }