ReuseAddress Property  
 

Set or return if a local socket address can be reused by the application.

Syntax

object.ReuseAddress [= { True | False } ]

Remarks

Setting this property to a value of true allows the address that the socket is listening on to be reused.

When a listening socket is closed, the socket will normally go into a TIME-WAIT state where the local address and port number cannot be immediately reused. A consequence of this is that calling the Disconnect method immediately followed by the Listen method using the same address and port number values may result in an error indicating that the specified address is already in use. By setting this property to True, that error is avoided and the listening socket can be created immediately without waiting for the TIME-WAIT period to elapse.

Data Type

Boolean

See Also

Broadcast Property, InLine Property, NoDelay Property, KeepAlive Property, Route Property