public static IMatchController CreateHost(this INetworkStrategy strategy, NetworkHost host, MatchConfig config) { var server = strategy.CreateServer(host.Server, config); var client = strategy.CreateClient(host.Client, config); return(new NetworkHostController(client, server)); }
public NetworkController() { _networkStrategy = NetworkStrategyFactory.Instance.CreateDotNetworkStrategy(); //#if NETFX_CORE // _networkStrategy = NetworkStrategyFactory.Instance.CreateUWPworkStrategy(); //#else // _networkStrategy = NetworkStrategyFactory.Instance.CreateDotNetworkStrategy(); //#endif ListenerStartedArgs = new ListenerStartedArgs(); ClientConnectedArgs = new ClientConnectedArgs(); }
public NetworkClient(IProtocolInterpreter interpreter, INetworkStrategy networkStrategy) : base(networkStrategy) { this._bufferedPackages = new List <ByteArray>(); this._backupPackages = new List <ByteArray>(); this._interpreter = interpreter; }
protected NetworkClient(INetworkStrategy networkStrategy) : this(null, networkStrategy) { }
public NetworkServer(IProtocolInterpreter interpreter, INetworkStrategy networkStrategy) : base(networkStrategy) { this._clients = new Dictionary <int, ClientSession>(); this._disconnectedClients = new Dictionary <int, ClientSession>(); this._interpreter = interpreter; }
protected NetworkServer(INetworkStrategy networkStrategy) : this(null, networkStrategy) { }
protected NetworkWorker(INetworkStrategy networkStrategy) { this._networkStrategy = networkStrategy; }