Skip to content

Latest commit

 

History

History
148 lines (102 loc) · 2.58 KB

ServerSocket.md

File metadata and controls

148 lines (102 loc) · 2.58 KB

ServerSocket

  • class ServerSocket (php\net\ServerSocket)
  • package std
  • source php/net/ServerSocket.php

Description

Class SocketServer


Static Methods


Methods


Static Methods

findAvailableLocalPort()

ServerSocket::findAvailableLocalPort(): int

isAvailableLocalPort()

ServerSocket::isAvailableLocalPort(int $port): bool

Methods

__construct()

__construct(int $port, int $backLog): void

accept()

accept(): Socket

bind()

bind(string $hostname, int $port, int $backLog): void

close()

close(): void

isClosed()

isClosed(): bool

isBound()

isBound(): bool

Returns the binding state of the ServerSocket.


setSoTimeout()

setSoTimeout(int $timeout): void

Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.


setReuseAddress()

setReuseAddress(bool $on): void

Enable/disable the SO_REUSEADDR socket option.


setReceiveBufferSize()

setReceiveBufferSize(int $size): void

setPerformancePreferences()

setPerformancePreferences(int $connectTime, int $latency, int $bandWidth): void

Sets performance preferences for this ServerSocket.

! Not implemented yet for TCP/IP