ServerBinding

Overview

The ServerBinding class represents an EndPoint that a server applocation will be accepting connections on.

The binding can be bound to activate it and start listening for incoming connections, or unbound to close it.

Location

  • Reference:
    • RemObjects.InternetPack.dll  .NET, .NET Core 5.0, .NET Standard 2.0
    • RemObjects.InternetPack.fx  Island
    • libRemObjects.InternetPack.fx  Toffee
  • Namespace: RemObjects.InternetPack
  • Ancestry: Binding | ServerBinding

 

constructor

Creates a new instance of the ServerBinding class.

 

constructor

 

ServerBinding()

 

init()

 

Sub New()

constructor (AddressFamily)    (declared in Binding)

 

constructor(addressFamily: AddressFamily)

 

ServerBinding(AddressFamily addressFamily)

 

init(_ addressFamily: AddressFamily)

 

Sub New(addressFamily As AddressFamily)

Parameters:

  • addressFamily:

Accept  virtual

Returns a Connection instance with attached listening socket.

 

method Accept: Connection

 

Connection Accept()

 

func Accept() -> Connection

 

Function Accept() As Connection

Address  virtual    (declared in Binding)

The IP Address of the binding.

 

property Address: IPAddress read write;

 

IPAddress Address { get; set; }

 

var Address: IPAddress { get{} set{} }

 

Property Address() As IPAddress

AddressFamily  virtual    (declared in Binding)

AddressFamily denotes the type of address (and thus the means to communicate) of the binding. The default value for InternetPack "InterNetwork" is defined in System.Net.Sockets.AddressFamily

 

property AddressFamily: AddressFamily read write;

 

AddressFamily AddressFamily { get; set; }

 

var AddressFamily: AddressFamily { get{} set{} }

 

Property AddressFamily() As AddressFamily

Bind  virtual

Associates a listening Socket with a local endpoint. Then this socket is passed to the provided IListener instance and a configured amount of listener thereads is started.

 

method Bind(listener: IListener)

 

void Bind(IListener listener)

 

func Bind(_ listener: IListener)

 

Sub Bind(listener As IListener)

Parameters:

  • listener: Custom socket listener

BindUnthreaded  virtual

Associates a listening Socket with a local endpoint.

 

method BindUnthreaded

 

void BindUnthreaded()

 

func BindUnthreaded()

 

Sub BindUnthreaded()

DefaultPort  virtual    (declared in Binding)

 

property DefaultPort: Int32 read write;

 

Int32 DefaultPort { get; set; }

 

var DefaultPort: Int32 { get{} set{} }

 

Property DefaultPort() As Int32

EnableNagle  virtual

Gets or sets a flag indicating whether a Nagle algorithm should be used while binding a socket.

The default value is false

Note: This property won't affect the socket settings is it is set after the socket is bound.

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(false)]
property EnableNagle: Boolean read write;
// Island
property EnableNagle: Boolean read write;

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(false)]
Boolean EnableNagle { get; set; }
// Island
Boolean EnableNagle { get; set; }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
@DefaultValue(false)
var EnableNagle: Boolean { get{} set{} }
// Island, Toffee
var EnableNagle: Boolean { get{} set{} }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
<DefaultValue(false)>
Property EnableNagle() As Boolean
// Island
Property EnableNagle() As Boolean

EndPoint  virtual

Gets a network EndPoint with the configured IP address and port number.

 

property EndPoint: IPEndPoint read;

 

IPEndPoint EndPoint { get; }

 

var EndPoint: IPEndPoint { get{} }

 

ReadOnly Property EndPoint() As IPEndPoint

ListenerThreadCount  virtual

Gets or sets the number of listener threads.

The default value is 1

Note: This property won't affect the socket settings is it is set after the socket is bound.

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(1)]
property ListenerThreadCount: Int32 read write;
// Island
property ListenerThreadCount: Int32 read write;

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(1)]
Int32 ListenerThreadCount { get; set; }
// Island
Int32 ListenerThreadCount { get; set; }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
@DefaultValue(1)
var ListenerThreadCount: Int32 { get{} set{} }
// Island, Toffee
var ListenerThreadCount: Int32 { get{} set{} }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
<DefaultValue(1)>
Property ListenerThreadCount() As Int32
// Island
Property ListenerThreadCount() As Int32

ListeningSocket  virtual

Gets the listening socket.

 

property ListeningSocket: Socket read;

 

Socket ListeningSocket { get; }

 

var ListeningSocket: Socket { get{} }

 

ReadOnly Property ListeningSocket() As Socket

MaxWaitConnections  virtual

Gets or sets the length of the internal Socket listener backlog.

The default value is 100

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(50)]
property MaxWaitConnections: Int32 read write;
// Island
property MaxWaitConnections: Int32 read write;

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(50)]
Int32 MaxWaitConnections { get; set; }
// Island
Int32 MaxWaitConnections { get; set; }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
@DefaultValue(50)
var MaxWaitConnections: Int32 { get{} set{} }
// Island, Toffee
var MaxWaitConnections: Int32 { get{} set{} }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
<DefaultValue(50)>
Property MaxWaitConnections() As Int32
// Island
Property MaxWaitConnections() As Int32

Port  virtual    (declared in Binding)

Denotes the port number associated with the socket binding. On a server connection, this would be the obvious protocol numbers (e.g: HTTP=80, FTP=21), on the client this number is assigned by the operating system when creating the socket.

 

property Port: Int32 read write;

 

Int32 Port { get; set; }

 

var Port: Int32 { get{} set{} }

 

Property Port() As Int32

Protocol  virtual    (declared in Binding)

Denotes the transport level protocol to use to communicate over the socket. The default value "TCP" for Internet Pack is defined in System.Net.Sockets.ProtocolType

 

property Protocol: ProtocolType read write;

 

ProtocolType Protocol { get; set; }

 

var Protocol: ProtocolType { get{} set{} }

 

Property Protocol() As ProtocolType

ReuseAddress  virtual

Gets or sets a flag indicating whether the socket is allowed to be bound to an address that is already in use.

The default value is true

 

property ReuseAddress: Boolean read write;

 

Boolean ReuseAddress { get; set; }

 

var ReuseAddress: Boolean { get{} set{} }

 

Property ReuseAddress() As Boolean

ShouldSerializePort  virtual    (declared in Binding)

 

method ShouldSerializePort: Boolean

 

Boolean ShouldSerializePort()

 

func ShouldSerializePort() -> Boolean

 

Function ShouldSerializePort() As Boolean

SocketType  virtual    (declared in Binding)

Denotes the type of socket used to use to communicate. Defined in System.Net.Sockets.SocketType

 

property SocketType: SocketType read write;

 

SocketType SocketType { get; set; }

 

var SocketType: SocketType { get{} set{} }

 

Property SocketType() As SocketType

Unbind  virtual

Unbinds the listening socket.

 

method Unbind

 

void Unbind()

 

func Unbind()

 

Sub Unbind()

Unbind (Boolean)  virtual

Unbinds the listening socket.

Optionally waits until all listening threads are terminated.

 

method Unbind(block: Boolean)

 

void Unbind(Boolean block)

 

func Unbind(_ block: Boolean)

 

Sub Unbind(block As Boolean)

Parameters:

  • block: A flag indicating whether method should wait until all listening threads are terminated

 

Address  virtual    (declared in Binding)

The IP Address of the binding.

 

property Address: IPAddress read write;

 

IPAddress Address { get; set; }

 

var Address: IPAddress { get{} set{} }

 

Property Address() As IPAddress

AddressFamily  virtual    (declared in Binding)

AddressFamily denotes the type of address (and thus the means to communicate) of the binding. The default value for InternetPack "InterNetwork" is defined in System.Net.Sockets.AddressFamily

 

property AddressFamily: AddressFamily read write;

 

AddressFamily AddressFamily { get; set; }

 

var AddressFamily: AddressFamily { get{} set{} }

 

Property AddressFamily() As AddressFamily

DefaultPort  virtual    (declared in Binding)

 

property DefaultPort: Int32 read write;

 

Int32 DefaultPort { get; set; }

 

var DefaultPort: Int32 { get{} set{} }

 

Property DefaultPort() As Int32

EnableNagle  virtual

Gets or sets a flag indicating whether a Nagle algorithm should be used while binding a socket.

The default value is false

Note: This property won't affect the socket settings is it is set after the socket is bound.

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(false)]
property EnableNagle: Boolean read write;
// Island
property EnableNagle: Boolean read write;

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(false)]
Boolean EnableNagle { get; set; }
// Island
Boolean EnableNagle { get; set; }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
@DefaultValue(false)
var EnableNagle: Boolean { get{} set{} }
// Island, Toffee
var EnableNagle: Boolean { get{} set{} }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
<DefaultValue(false)>
Property EnableNagle() As Boolean
// Island
Property EnableNagle() As Boolean

EndPoint  virtual

Gets a network EndPoint with the configured IP address and port number.

 

property EndPoint: IPEndPoint read;

 

IPEndPoint EndPoint { get; }

 

var EndPoint: IPEndPoint { get{} }

 

ReadOnly Property EndPoint() As IPEndPoint

ListenerThreadCount  virtual

Gets or sets the number of listener threads.

The default value is 1

Note: This property won't affect the socket settings is it is set after the socket is bound.

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(1)]
property ListenerThreadCount: Int32 read write;
// Island
property ListenerThreadCount: Int32 read write;

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(1)]
Int32 ListenerThreadCount { get; set; }
// Island
Int32 ListenerThreadCount { get; set; }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
@DefaultValue(1)
var ListenerThreadCount: Int32 { get{} set{} }
// Island, Toffee
var ListenerThreadCount: Int32 { get{} set{} }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
<DefaultValue(1)>
Property ListenerThreadCount() As Int32
// Island
Property ListenerThreadCount() As Int32

ListeningSocket  virtual

Gets the listening socket.

 

property ListeningSocket: Socket read;

 

Socket ListeningSocket { get; }

 

var ListeningSocket: Socket { get{} }

 

ReadOnly Property ListeningSocket() As Socket

MaxWaitConnections  virtual

Gets or sets the length of the internal Socket listener backlog.

The default value is 100

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(50)]
property MaxWaitConnections: Int32 read write;
// Island
property MaxWaitConnections: Int32 read write;

 

// .NET, .NET Core 5.0, .NET Standard 2.0
[DefaultValue(50)]
Int32 MaxWaitConnections { get; set; }
// Island
Int32 MaxWaitConnections { get; set; }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
@DefaultValue(50)
var MaxWaitConnections: Int32 { get{} set{} }
// Island, Toffee
var MaxWaitConnections: Int32 { get{} set{} }

 

// .NET, .NET Core 5.0, .NET Standard 2.0
<DefaultValue(50)>
Property MaxWaitConnections() As Int32
// Island
Property MaxWaitConnections() As Int32

Port  virtual    (declared in Binding)

Denotes the port number associated with the socket binding. On a server connection, this would be the obvious protocol numbers (e.g: HTTP=80, FTP=21), on the client this number is assigned by the operating system when creating the socket.

 

property Port: Int32 read write;

 

Int32 Port { get; set; }

 

var Port: Int32 { get{} set{} }

 

Property Port() As Int32

Protocol  virtual    (declared in Binding)

Denotes the transport level protocol to use to communicate over the socket. The default value "TCP" for Internet Pack is defined in System.Net.Sockets.ProtocolType

 

property Protocol: ProtocolType read write;

 

ProtocolType Protocol { get; set; }

 

var Protocol: ProtocolType { get{} set{} }

 

Property Protocol() As ProtocolType

ReuseAddress  virtual

Gets or sets a flag indicating whether the socket is allowed to be bound to an address that is already in use.

The default value is true

 

property ReuseAddress: Boolean read write;

 

Boolean ReuseAddress { get; set; }

 

var ReuseAddress: Boolean { get{} set{} }

 

Property ReuseAddress() As Boolean

SocketType  virtual    (declared in Binding)

Denotes the type of socket used to use to communicate. Defined in System.Net.Sockets.SocketType

 

property SocketType: SocketType read write;

 

SocketType SocketType { get; set; }

 

var SocketType: SocketType { get{} set{} }

 

Property SocketType() As SocketType

 

constructor

Creates a new instance of the ServerBinding class.

 

constructor

 

ServerBinding()

 

init()

 

Sub New()

constructor (AddressFamily)    (declared in Binding)

 

constructor(addressFamily: AddressFamily)

 

ServerBinding(AddressFamily addressFamily)

 

init(_ addressFamily: AddressFamily)

 

Sub New(addressFamily As AddressFamily)

Parameters:

  • addressFamily:

Accept  virtual

Returns a Connection instance with attached listening socket.

 

method Accept: Connection

 

Connection Accept()

 

func Accept() -> Connection

 

Function Accept() As Connection

Bind  virtual

Associates a listening Socket with a local endpoint. Then this socket is passed to the provided IListener instance and a configured amount of listener thereads is started.

 

method Bind(listener: IListener)

 

void Bind(IListener listener)

 

func Bind(_ listener: IListener)

 

Sub Bind(listener As IListener)

Parameters:

  • listener: Custom socket listener

BindUnthreaded  virtual

Associates a listening Socket with a local endpoint.

 

method BindUnthreaded

 

void BindUnthreaded()

 

func BindUnthreaded()

 

Sub BindUnthreaded()

ShouldSerializePort  virtual    (declared in Binding)

 

method ShouldSerializePort: Boolean

 

Boolean ShouldSerializePort()

 

func ShouldSerializePort() -> Boolean

 

Function ShouldSerializePort() As Boolean

Unbind  virtual

Unbinds the listening socket.

 

method Unbind

 

void Unbind()

 

func Unbind()

 

Sub Unbind()

Unbind (Boolean)  virtual

Unbinds the listening socket.

Optionally waits until all listening threads are terminated.

 

method Unbind(block: Boolean)

 

void Unbind(Boolean block)

 

func Unbind(_ block: Boolean)

 

Sub Unbind(block As Boolean)

Parameters:

  • block: A flag indicating whether method should wait until all listening threads are terminated