ServerSocket¶
-
php\net\ServerSocket
Class SocketServer
Methods
__construct
($port = null, $backLog = 50)¶
Параметры:
- $port –
int
- $backLog –
int
accept
()¶throws php\io\IOException
Результат: php\net\Socket
bind
($hostname, $port, $backLog = 50)¶throws php\net\SocketException
Параметры:
- $hostname –
string
- $port –
int
- $backLog –
int
close
()¶throws php\io\IOException
isClosed
()¶
Результат: bool
isBound
()¶Returns the binding state of the ServerSocket.
Результат: bool
setSoTimeout
($timeout)¶Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
throws php\net\SocketException
Параметры:
- $timeout –
int
setReuseAddress
($on)¶Enable/disable the SO_REUSEADDR socket option.
throws php\net\SocketException
Параметры:
- $on –
bool
setReceiveBufferSize
($size)¶throws php\net\SocketException
Параметры:
- $size –
int
setPerformancePreferences
($connectTime, $latency, $bandWidth)¶Sets performance preferences for this ServerSocket.
! Not implemented yet for TCP/IP
Параметры:
- $connectTime –
int
- $latency –
int
- $bandWidth –
int
- static
findAvailableLocalPort
¶
Результат: int