CEngineSharp_Client.Net.NetManager.NetManager C# (CSharp) Method

NetManager() public method

public NetManager ( ) : System
return System
        public NetManager()
        {
            _packetHandlers = new Dictionary<PacketType, List<Action<PacketReceivedEventArgs>>>();
            _packetCache = new List<Tuple<NetOutgoingMessage, NetDeliveryMethod, ChannelTypes>>();

            NetPeerConfiguration config = new NetPeerConfiguration("CEngineSharp");
            config.EnableMessageType(NetIncomingMessageType.Data);
            config.EnableMessageType(NetIncomingMessageType.DiscoveryResponse);
            config.EnableMessageType(NetIncomingMessageType.ConnectionApproval);

            _netClient = new NetClient(config);
            _netClient.Start();
        }