/// <summary> /// Constuctor for this object keeps the /// </summary> /// <param name="hostName"> /// A string primtive that represents the host's name /// This will either be an ipAddress (IP4 tested) or the /// string "localhost" will also work. /// </param> public TCPClient(string hostName, int portNumber = NetworkingLibaryStandard.DefaultPortNumber, IContinuousMessageHandeler responder = null) { // set the values this.PortNumber = portNumber; this.ServerHostName = hostName; Responder = responder; }
/// <summary> /// Creates this object allowing /// </summary> /// <param name="portNumber"> /// a int primitive that will represent the port number of this object /// </param> /// <param name="hostName"> /// A string primtive that represents the host's name /// This will either be an ipAddress (IP4 tested) or the /// string "localhost" will also work. /// </param> /// <param> /// /// </param> public TCPClient(int portNumber = NetworkingLibaryStandard.DefaultPortNumber, string hostName = NetworkingLibaryStandard.LocalHostString, IContinuousMessageHandeler responder = null) { // validate the parameters // TODO: validate host name if (portNumber < 0 || hostName == null) { throw new ArgumentException("one or more arguments have invalid values"); } // set the values this.PortNumber = portNumber; this.ServerHostName = hostName; this.Responder = responder; }