SocketTools .NET Edition

InternetServer Constructor 

Initializes a new instance of the InternetServer class.

[Visual Basic]
Public Sub New()
[C#]
public InternetServer();

Example

The following example demonstrates creating an instance of the InternetServer class object and starting a server using the Start method.

[Visual Basic]
Dim Server As SocketTools.InternetServer
Dim strLocalAddress As String
Dim nLocalPort As Integer
 
Server = New SocketTools.InternetServer
 
strLocalAddress = TextBox1.Text.Trim()
nLocalPort = Val(TextBox2.Text)
 
If Server.Start(strLocalAddress, nLocalPort) Then
    StatusBar1.Text = "The server has started listening for connections"
Else
    StatusBar1.Text = "The server could not be started"
End If
    

See Also

InternetServer Class | SocketTools Namespace