SocketTools .NET Edition

InternetServer.ServerAddress Property

Gets and sets the address that will be used by the server to listen for connections.

[Visual Basic]
Public Property ServerAddress As String
[C#]
public string ServerAddress {get; set;}

Property Value

A string which specifies the IP address that the server will use to listen for incoming client connections. An empty string indicates that the server will accept connections on any valid network interface configured for the local system.

Remarks

The ServerAddress property is used to specify the default address that the server will use when listening for connections. Setting this property to the value 0.0.0.0 or an empty string indicates that the server should listen for client connections using any valid network interface. If an address is specified, it must be a valid Internet address that is bound to a network adapter configured on the local system. Clients will only be able to connect to the server using that specific address.

It is common to set this property to the value 127.0.0.1 for testing purposes. It is a non-routable address that specifies the local system, and most software firewalls are configured so they do not block applications using this address.

See Also

InternetServer Class | SocketTools Namespace | ServerName Property | ServerPort Property