ServerSocket
extends
Closable
in
Table of Contents
Methods
- accept() : Socket|null
- close() : void
- Closes the resource, marking it as unusable.
- getAddress() : SocketAddress
- getBindContext() : BindContext
- isClosed() : bool
- Returns whether this resource has been closed.
- onClose() : void
- Registers a callback that is invoked when this resource is closed.
Methods
accept()
public
accept([Cancellation|null $cancellation = null ]) : Socket|null
Parameters
- $cancellation : Cancellation|null = null
Tags
Return values
Socket|nullclose()
Closes the resource, marking it as unusable.
public
close() : void
Whether pending operations are aborted or not is implementation dependent.
getAddress()
public
getAddress() : SocketAddress
Return values
SocketAddressgetBindContext()
public
getBindContext() : BindContext
Return values
BindContextisClosed()
Returns whether this resource has been closed.
public
isClosed() : bool
Return values
bool —true if closed, otherwise false.
onClose()
Registers a callback that is invoked when this resource is closed.
public
onClose(callable(): void $onClose) : void
Parameters
- $onClose : callable(): void