Dart.PowerTCP.SslSockets Namespace > Tcp Class > Tcp Constructor : Tcp Constructor(Socket) |
Initializes a new instance of the Tcp class, specifying the System.Net.Sockets.Socket to use for the underlying connection.
[Visual Basic]
Public Function New( _
ByVal acceptedSocket As Socket _
)
[C#]
public Tcp(
Socket acceptedSocket
);
[C++]
public: Tcp(
Socket* acceptedSocket
)
[C++/CLI]
public:
Tcp(
Socket^ acceptedSocket
)
Use this constructor create an instance of the Tcp class using an already created Socket. Typically, this is used when a connection is made on a socket that is listening for connections.
To create an instance of the Tcp component using Visual Studio.NET, simply add the Tcp component to the form and the object will automatically be created and initialized. If working out of the Visual Studio.NET environment (or using the Tcp component as a reference), the Tcp component will have to be explicitly created and initialized.
The following table shows initial property values for an instance of Tcp.
Property | Initial Value |
---|---|
Available | 0 |
Charset | Default system charset (accessible via System.Text.Encoding.Default.BodyName) |
Connected | false |
DoEvents | true |
KeepAlive | false |
LocalEndPoint | reference to System.Net.IPEndPoint |
NoDelay | false |
OutOfBandInline | false |
Proxy | reference to Dart.PowerTCP.Proxy |
ReceiveBufferSize | 8192 |
ReceiveTimeout | 0 |
RemoteEndPoint | reference to System.Net.IPEndPoint |
ReuseAddress | false |
SendBufferSize | 8192 |
SendTimeout | 0 |
Socket | null |
Tcp.State | null |
Stream | SegmentedStream object |
The following example demonstrates creating a Tcp object.
[Visual Basic]
' Declare as class member
Friend WithEvents Tcp1 As Tcp
' Create in class initialization
Me.Tcp1 = New Tcp()
[C#]
private Tcp tcp1 = new Tcp();
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Tcp Class | Tcp Members | Overload List
Send comments on this topic.
Documentation version 1.1.2.0.
© 2008 Dart Communications. All rights reserved.