Syntax

C#
public class TcpTextClient
Visual Basic (Declaration)
Public Class TcpTextClient
Visual C++
public ref class TcpTextClient

The type exposes the following members.

Public Constructors

  NameDescription
Public methodTcpTextClientTcpTextClientNew
Creates new TcpTextClient object.

Public Methods

  NameDescription
Public methodBeginConnectOverloaded.
Public methodCloseOverloaded.
Public methodConnectOverloaded.
Public methodEndConnect
Asynchronously accepts an incoming connection attempt.
(Inherited from TcpClient.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type. GetHashCode()() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
Public methodGetStream
Gets SslStream or NetworkStream for current connection.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodReceiveLine
Reads data from server until gets "\r\n" string.
Public methodSend
Sends the text command to server. Adds "\r\n" to the command.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

Protected Methods

  NameDescription
Protected methodCloseCommand
Derived classes should overide this method to perform specific closing action.
Protected methodCreateSSLStream
Creates SSL stream. and authenticates client.
Protected methodDispose
Releases the unmanaged resources used by the TcpClient and optionally releases the managed resources.
(Inherited from TcpClient.)
Protected methodFinalize
Frees resources used by the TcpClient class.
(Inherited from TcpClient.)
Protected methodGetServerGreeting
Override this function to get server's greeting.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodSetStreams
Creates new Reader and Writer objects.

Public Fields

  NameDescription
Public fieldReader
StreamReader used for reading from network stream or SSL stream.
Public fieldWriter
StringWriter used for writing to network stream or SSL stream.

Public Properties

  NameDescription
Public propertyAvailable
Gets the amount of data that has been received from the network and is available to be read.
(Inherited from TcpClient.)
Public propertyClient
Gets or sets the underlying Socket.
(Inherited from TcpClient.)
Public propertyConnected
Gets a value indicating whether the underlying Socket for a TcpClient is connected to a remote host.
(Inherited from TcpClient.)
Public propertyExclusiveAddressUse
Gets or sets a Boolean value that specifies whether the TcpClient allows only one client to use a port.
(Inherited from TcpClient.)
Public propertyLingerState
Gets or sets information about the sockets linger time.
(Inherited from TcpClient.)
Public propertyNoDelay
Gets or sets a value that disables a delay when send or receive buffers are not full.
(Inherited from TcpClient.)
Public propertyReceiveBufferSize
Gets or sets the size of the receive buffer.
(Inherited from TcpClient.)
Public propertyReceiveTimeout
Gets or sets the amount of time a TcpClient will wait to receive data once a read operation is initiated.
(Inherited from TcpClient.)
Public propertySendBufferSize
Gets or sets the size of the send buffer.
(Inherited from TcpClient.)
Public propertySendTimeout
Gets or sets the amount of time a TcpClient will wait for a send operation to complete successfully.
(Inherited from TcpClient.)
Public propertySSLStream
Returns used SslStream or null if SSL is not enbled.

Protected Properties

  NameDescription
Protected propertyActive
Gets or set a value that indicates whether a connection has been made.
(Inherited from TcpClient.)

Public Events

  NameDescription
Public eventServerCertificateValidate
Event which is called for custom server validation.

See Also