Пример #1
0
 public LiteNetLibTransportEventListener(bool isServer, LiteNetLibTransport transport, Queue <TransportEventData> eventQueue, Dictionary <long, NetPeer> peersDict)
 {
     this.isServer   = isServer;
     this.peersDict  = peersDict;
     this.transport  = transport;
     this.eventQueue = eventQueue;
 }
Пример #2
0
        public static void SetNetworkServerManager(string discoveryName, int port)
        {
            LiteNetLibTransport transport = new LiteNetLibTransport(port);

            transport.SetBroadcastData(discoveryName);
            LiteNetLibSerializer serializer = new LiteNetLibSerializer();

            netManager = new NetworkServerManager(transport, serializer);

            ServiceManager.Init(netManager);
        }
Пример #3
0
        public static void Init(int port)
        {
            m_port = port;

            LiteNetLibTransport transport = new LiteNetLibTransport();

            transport.SetDiscoveryServer(true, port);
            LiteNetLibSerializer serializer = new LiteNetLibSerializer();

            netManager = new NetworkClientManager(transport, serializer);

            controllerManager.Init(netManager);

            if (OnInit != null)
            {
                OnInit();
            }
        }
 public LiteNetLibTransportEventListener(LiteNetLibTransport transport, Queue <TransportEventData> eventQueue, Dictionary <long, NetPeer> serverPeers) : this(transport, eventQueue)
 {
     this.serverPeers = serverPeers;
 }
 public LiteNetLibTransportEventListener(LiteNetLibTransport transport, Queue <TransportEventData> eventQueue)
 {
     this.transport  = transport;
     this.eventQueue = eventQueue;
 }
 public LiteNetLibTransportEventListener(LiteNetLibTransport transport, Queue <TransportEventData> eventQueue, Dictionary <long, NetPeer> peersDict) : this(transport, eventQueue)
 {
     this.peersDict = peersDict;
 }