Websockets and IP range filter

Jun 1, 2015 at 11:39 AM
Edited Jun 1, 2015 at 11:40 AM
Hello,

I tried to create the ip range filter for the websockets, like the sample for SuperSockets do.
http://docs.supersocket.net/v1-6/en-US/Connection-Filter.
Unfortunately at the end there is no CnonnectionFilter in the AppServerBase.

Here my Code:
            NameValueCollection serverOptions = new NameValueCollection();
            serverOptions.Add("ipRange", "127.0.0.1-127.0.0.2");
            ServerConfig serverConfig = new ServerConfig
            {
               Name = "MyWebSocketServer",
               Ip = Any,
               Port = 12345,
               Mode = SocketMode.Tcp,
               ConnectionFilter = "IpRangeFilter",
               Options = serverOptions
            };
            WebSocketServer _ws = new WebSocketServer();

            _ws.Setup(rootConfig, serverConfig, socketServerFactory);
            _connectionFilter = new IPConnectionFilter();
            _connectionFilter.Initialize("IpRangeFilter", _ws);

// Here the OnConnect event
      void ws_NewSessionConnected(WebSocketSession session)
      {
         Log.InfoFormat("Local endpoint: {0}", session.LocalEndPoint);
         Log.InfoFormat("Remote endpoint: {0}", session.RemoteEndPoint);
         // Nothing in here!!!
         var filters = session.AppServer.ConnectionFilters;
      }