Example #1
0
        internal ClientLogicProcessor(LiNGSClient client)
        {
            this.client             = client;
            this.networkObjectQueue = new List <QueuedNetworkedObjectData>();

            this.NetworkedObjects      = new Dictionary <string, NetworkedObject>();
            this.NetworkedLocalObjects = new Dictionary <string, NetworkedObject>();
        }
Example #2
0
        internal Manager(LiNGSClient client)
        {
            this.client                      = client;
            this.importantMessages           = new List <ImportantMessageWrapper>();
            this.ConnectionEstablisherHelper = new ConnectionEstablisherHelper(client);

            client.UpdateManager.AddUpdatable(ConnectionEstablisherHelper);
        }
Example #3
0
        internal NetworkManager(LiNGSClient client, string serverIp, int serverPort)
        {
            this.client       = client;
            this.clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
            this.receivedData = new byte[client.ClientProperties.MaxMessageSize]; //Maximum message size is defaulted to 512 to avoid network fragmentation, see: RFC 1122 Section 3.3.2

            IPAddress  serverIpAddress = IPAddress.Parse(serverIp);
            IPEndPoint serverEndPoint  = new IPEndPoint(serverIpAddress, serverPort);

            epServer = (EndPoint)serverEndPoint;
        }
Example #4
0
    void Start()
    {
        if (Default != null)
        {
            Destroy(gameObject);
        }

        Default = this;
        DontDestroyOnLoad(gameObject);

        ClientProperties properties = ClientProperties.Default;
        ServerInfo       serverInfo = ServerInfo.DefaultLocal;

        networkClient = new LiNGSClient(properties, serverInfo, this);
        networkClient.Connect();
    }
 public ConnectionEstablisherHelper(LiNGSClient client)
 {
     this.client = client;
 }
Example #6
0
 public Analyzer(LiNGSClient client)
 {
     this.client = client;
 }
Example #7
0
 public MessageAggregator(LiNGSClient client)
 {
     this.client           = client;
     this.bufferedMessages = new Dictionary <NetworkClient, BufferedNetworkMessage>();
     this.messagesToSend   = new List <BufferedNetworkMessage>();
 }
Example #8
0
 public void Connect(ClientProperties clientProperties, ServerInfo serverInfo)
 {
     lingsClient = new LiNGSClient(clientProperties, serverInfo, this);
     lingsClient.Connect();
 }
Example #9
0
 internal Synchronizer(LiNGSClient client)
 {
     this.client = client;
     this.SynchronizedObjects = new Dictionary <string, SynchronizedObject>();
 }
Example #10
0
 internal Simulator(LiNGSClient client)
 {
     this.client          = client;
     this.simulatedFields = new List <SimulatedObjectField>();
     this.simulatorLogic  = client.ClientProperties.FieldSimulationLogic;
 }