Team XSockets.NET

Configuration behind firewall

A common scenario is that you have your server on a machine behind a firewall and need to let traffic through. For this to work you have to create a configuration with a private and a public endpoint.

The private endpoint is your machine behind the firewall, and the public endpoint is the one that client use when connecting.

For example, if you want your users to connect to and your server is located on a machine with IP you may do something like this.

using System;
using System.Collections.Generic;
using XSockets.Core.Configuration;

namespace XSocketsTutorial.Configurations
    public class MyFirewallConfig : ConfigurationSetting
        public MyFirewallConfig() : base(new Uri("ws://"),new Uri("ws://"))

So the client will connect to and your server have an endpoint at


Ofcourse you have to setup a rule in your firewall to pass traffic from to

results matching ""

    No results matching ""