Version: 1.1.1.0
Easily add SSL security and authentication to your Internet application in .NET. Includes components for TCP, Server, UDP, DNS, Ping, and Trace (trace route).

Secure Tcp .NET Component

Use the Secure Tcp component within the .NET Framework to communicate with any host using SSL over TCP. Features include:

  • Select SSL 2.0, SSL 3.0, PCT, TLS or unencrypted TCP communications.
  • Use in conjunction with the SslStream class to communicate using SSL.
  • Stream interface enables advanced read/write capabilities such as reading to a delimiter.
  • Send data synchronously or asynchronously.
  • Trace event exposes the TCP communication.
  • Design-time editor assists in protocol testing.
  • C# and VB.NET sample projects included.
  • Integrates with all versions of Visual Studio and supports C#, VB.NET, ASP.NET, Delphi 8, C# Builder, and other .NET compliant development environments.
  • Includes a royalty-free license!

Looking for the ActiveX version of this component?

Interface

Public Constructors
Tcp Overloaded. Initialize a new instance of the Tcp class.
Public Properties
AutoReceive Gets or sets a value which determines if data is automatically recieved.
Available Gets the amount of data that has been received from the network and is available to be read.
Certificate The Certificate object representing the certificate to use for optional client-side authentication.
Charset Gets and sets the character set used for string/byte array conversions.
Connected Gets the connected state of the connection.
ConnectTimeout Gets or sets the number of milliseconds to wait for response from the server when connecting.
DoEvents Gets or sets a value that controls the processing of events during blocking method calls.
Editor In Visual Studio.NET, displays an interactive form to use to test real time protocol operations.
KeepAlive Gets or sets the value of the socket's KeepAlive option.
LocalEndPoint Returns the local address the socket is bound to.
NoDelay Gets and sets a value the disables the use of Nagle's algorithm so that data is sent immediately.
OutOfBandInline Gets or sets a value that indicates whether out-of-band (urgent) data is read as normal in-line data.
Proxy Returns the Proxy instance that controls proxy server use.
ReceiveBufferSize Gets and sets the size of the system receive buffer.
ReceiveTimeout Gets and sets the number of milliseconds that a Tcp.Receive method will block before throwing a SocketException.
RemoteEndPoint Returns the remote address/port the socket is connected to.
ReuseAddress Gets or sets a value that typically allows any local port to be specified, even if it is already in use.
SecureProtocol Gets or sets a value which determines the type of encryption to use on the data.
SendBufferSize Gets and sets the size of the system send buffer.
SendTimeout Gets and sets the number of milliseconds that a Tcp.Send method will block before throwing a SocketException.
Socket Returns a reference to the System.Net.Sockets.Socket instance being used.
Stream Returns a SegmentedStream that can be used for advanced streaming operations on the socket.
SynchronizingObject Set this object to automatically control thread marshalling between worker threads and the main UI thread.
Tag Gets or sets an object reference that can be used to associate this instance with any other.
UseAuthentication Gets or sets a value that determines if certificate authentication is used.
UseSslShutdown Controls whether or not shut-down bytes are sent to the server when the connection is closed.
Public Methods
BeginConnect Overloaded. Connect to a server asynchronously, specifying the local interface and a range of local ports to use. The Tcp.EndConnect event is raised when completed.
BeginReceive Overloaded. Receive data into your buffer asynchronously specifying a buffer, offset, size and SocketFlags value. The Tcp.EndReceive event is raised when completed.
BeginSend Overloaded. Send data from your buffer asynchronously, specifying a buffer, offset, size and SocketFlags value. The Tcp.EndSend event is raised when completed.
Close Overloaded. Close the connection.
Connect Overloaded. Connect to a host, specifying the local interface and a range of local ports to use.
Receive Overloaded. Receive data from the host, specifying a buffer, offset, size and SocketFlags value.
Send Overloaded. Send data to the server, specifying a buffer, offset, size and SocketFlags value.
Public Events
CertificateReceived This event is raised when a certificate has been received to be authenticated.
CertificateRequested This event is raised when a certificate has been requested.
ConnectedChanged Raised when the value of the Object.Connected property changes.
EndConnect Raised when the Tcp.BeginConnect request completes.
EndReceive Raised when the Tcp.BeginReceive request completes.
EndSend Raised when the Tcp.BeginSend request completes.
RawTrace Raised when data has been sent/received.
Trace Raised when data has been sent/received.

Code Example

How easy is the Tcp component to use? Check out the VB.NET code below to see how easy-to-use the Tcp component is. This example demonstrates communicating with an echo server.

' Connect to an Echo server (typically port 7)
Tcp1.Connect("myserver", 7)

' Send some data
Tcp1.Send("test")

' Receive the echoed data
Dim seg as Segment = Tcp1.Receive()

' In the Echo protocol, the server waits until the client closes the connection.
Tcp1.Close()

' Display the data received (should be "test")
Debug.WriteLine(seg.ToString())