Ejemplo n.º 1
0
        /// <summary>
        /// Constructs a new UDP Connector.
        /// </summary>
        /// <param name="myClient">The connectors main Extasys UDP Client.</param>
        /// <param name="name">The name of the connector.</param>
        /// <param name="readBufferSize">The maximum number of bytes the socket can read at a time.</param>
        /// <param name="readTimeOut">The maximum time in milliseconds in wich a datagram packet can be received. Set to 0 for no time-out.</param>
        /// <param name="serverIP">The server's ip address the connector will use to send data.</param>
        /// <param name="serverPort">The server's udp port.</param>
        public UDPConnector(ExtasysUDPClient myClient, string name, int readBufferSize, int readTimeOut, IPAddress serverIP, int serverPort)
        {
            fMyUDPClient    = myClient;
            fName           = name;
            fReadBufferSize = readBufferSize;
            fReadTimeOut    = readTimeOut;
            fServerIP       = serverIP;
            fServerPort     = serverPort;

            fReadBuffer = new byte[readBufferSize];

            fServerEndPoint = new IPEndPoint(fServerIP, fServerPort);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructs a new UDP Connector.
        /// </summary>
        /// <param name="myClient">The connectors main Extasys UDP Client.</param>
        /// <param name="name">The name of the connector.</param>
        /// <param name="readBufferSize">The maximum number of bytes the socket can read at a time.</param>
        /// <param name="readTimeOut">The maximum time in milliseconds in wich a datagram packet can be received. Set to 0 for no time-out.</param>
        /// <param name="serverIP">The server's ip address the connector will use to send data.</param>
        /// <param name="serverPort">The server's udp port.</param>
        public UDPConnector(ExtasysUDPClient myClient, string name, int readBufferSize, int readTimeOut, IPAddress serverIP, int serverPort)
        {
            fMyUDPClient = myClient;
            fName = name;
            fReadBufferSize = readBufferSize;
            fReadTimeOut = readTimeOut;
            fServerIP = serverIP;
            fServerPort = serverPort;

            fReadBuffer = new byte[readBufferSize];

            fServerEndPoint = new IPEndPoint(fServerIP, fServerPort);
        }