ServerSocket

php\net\ServerSocket

Class SocketServer

Methods


__construct($port = null, $backLog = 50)
Параметры:
  • $portint
  • $backLogint
accept()

throws php\io\IOException

Результат:php\net\Socket
bind($hostname, $port, $backLog = 50)

throws php\net\SocketException

Параметры:
  • $hostnamestring
  • $portint
  • $backLogint
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

Параметры:
  • $timeoutint
setReuseAddress($on)

Enable/disable the SO_REUSEADDR socket option.

throws php\net\SocketException

Параметры:
  • $onbool
setReceiveBufferSize($size)

throws php\net\SocketException

Параметры:
  • $sizeint
setPerformancePreferences($connectTime, $latency, $bandWidth)

Sets performance preferences for this ServerSocket.

! Not implemented yet for TCP/IP

Параметры:
  • $connectTimeint
  • $latencyint
  • $bandWidthint
static findAvailableLocalPort
Результат:int