The TcpTextClient type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| TcpTextClient |
Initializes a new instance of the TcpTextClient object.
Sets ReceiveTimeout and SendTimeout to 20 sec.
|
Methods
| Name | Description | |
|---|---|---|
| Attach(Socket) |
Attaches client to specified socket.
| |
| Attach(Socket, Boolean) |
Attaches client to specified socket.
| |
| AttachSSL |
Attaches client to specified socket.
| |
| Close()()()() |
Issues quit command (CloseCommand()()()() method), closes the connection, disposes the object.
| |
| Close(Boolean) |
Issues quit command (CloseCommand()()()() method) and closes the connection.
| |
| CloseCommand |
Derived classes should override this method to
perform specific closing action.
| |
| Connect(IPEndPoint, Boolean) |
Connects to server.
| |
| Connect(String, Int32) |
Connects to server. Use ConnectSSL(String, Int32) when SSL connection is needed.
| |
| Connect(IPAddress, Int32, Boolean) |
Connects to server.
| |
| Connect(String, Int32, Boolean) |
Connects to server.
| |
| ConnectSSL |
Connects to server using SSL.
| |
| Dispose |
Releases all resources acquired by this object. Closes connection, without issuing any quit commands.
| |
| Equals | (Inherited from Object.) | |
| Finalize |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| GetHashCode |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetServerGreeting |
Override this function to get server's greeting.
| |
| GetType |
Gets the Type of the current instance.
(Inherited from Object.) | |
| MemberwiseClone |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| Send |
Sends the text command to server.
Adds "\r\n" to the command.
| |
| SwitchToSSL |
Switches to SSL stream, authenticates as client.
| |
| ToString | (Inherited from Object.) |
Properties
| Name | Description | |
|---|---|---|
| Connected |
Gets a value indicating whether the underlying Socket is connected to a remote host.
| |
| Reader | StreamReader used for reading from network stream or SSL stream.
| |
| ReceiveTimeout |
Gets or sets the amount of time a TcpClient will wait to receive data once a read operation is initiated.
| |
| SendTimeout |
Gets or sets the amount of time a TcpClient will wait for a send operation to complete successfully.
| |
| Socket |
Gets the underlying Socket.
| |
| SSLConfiguration |
Represents SSL configuration (client certificates, enabled SSL protocols).
| |
| SSLStream |
Gets SslStream or null if SSL is not enabled.
| |
| Stream |
Gets SslStream or NetworkStream for current connection.
| |
| Writer | StringWriter used for writing to network stream or SSL stream.
|
Events
| Name | Description | |
|---|---|---|
| ServerCertificateValidate |
Event which is called for custom server certificate validation.
|