# PHPWebSocket

class PHPWebSocket

## Constants

WS_MAX_CLIENTS |
WS_MAX_CLIENTS_PER_IP |
WS_TIMEOUT_RECV |
WS_TIMEOUT_PONG |
WS_MAX_FRAME_PAYLOAD_RECV |
WS_MAX_MESSAGE_PAYLOAD_RECV |
WS_FIN |
WS_MASK |
WS_OPCODE_CONTINUATION |
WS_OPCODE_TEXT |
WS_OPCODE_BINARY |
WS_OPCODE_CLOSE |
WS_OPCODE_PING |
WS_OPCODE_PONG |
WS_PAYLOAD_LENGTH_16 |
WS_PAYLOAD_LENGTH_63 |
WS_READY_STATE_CONNECTING |
WS_READY_STATE_OPEN |
WS_READY_STATE_CLOSING |
WS_READY_STATE_CLOSED |
WS_STATUS_NORMAL_CLOSE |
WS_STATUS_GONE_AWAY |
WS_STATUS_PROTOCOL_ERROR |
WS_STATUS_UNSUPPORTED_MESSAGE_TYPE |
WS_STATUS_MESSAGE_TOO_BIG |
WS_STATUS_TIMEOUT |

## Properties

| $wsClients |  |
| $wsRead |  |
| $wsClientCount |  |
| $wsClientIPCount |  |
| $wsOnEvents |  |

## Methods

wsStartServer($host, $port)

No description

wsStopServer()

No description

wsCheckIdleClients()

No description

wsAddClient($socket, $clientIP)

No description

wsRemoveClient($clientID)

No description

wsGetNextClientID()

No description

wsGetClientSocket($clientID)

No description

wsProcessClient($clientID, $buffer, $bufferLength)

No description

wsBuildClientFrame($clientID, $buffer, $bufferLength)

No description

wsCheckSizeClientFrame($clientID)

No description

wsProcessClientFrame($clientID)

No description

wsProcessClientMessage($clientID, $opcode, $data, $dataLength)

No description

wsProcessClientHandshake($clientID, $buffer)

No description

wsSendClientMessage($clientID, $opcode, $message)

No description

wsSendClientClose($clientID, $status = false)

No description

wsClose($clientID)

No description

wsSend($clientID, $message, $binary = false)

No description

log($message)

No description

bind($type, $func)

No description

unbind($type = '')

No description

## Details

###
at line 100
`wsStartServer($host, $port)`

No description

#### Parameters

| $host |
| $port |

###
at line 181
`wsStopServer()`

No description

###
at line 207
`wsCheckIdleClients()`

No description

###
at line 237
`wsAddClient($socket, $clientIP)`

No description

#### Parameters

| $socket |
| $clientIP |

###
at line 258
`wsRemoveClient($clientID)`

No description

#### Parameters

| $clientID |

###
at line 286
`wsGetNextClientID()`

No description

###
at line 291
`wsGetClientSocket($clientID)`

No description

#### Parameters

| $clientID |

###
at line 296
`wsProcessClient($clientID, $buffer, $bufferLength)`

No description

#### Parameters

| $clientID |
| $buffer |
| $bufferLength |

###
at line 319
`wsBuildClientFrame($clientID, $buffer, $bufferLength)`

No description

#### Parameters

| $clientID |
| $buffer |
| $bufferLength |

###
at line 360
`wsCheckSizeClientFrame($clientID)`

No description

#### Parameters

| $clientID |

###
at line 437
`wsProcessClientFrame($clientID)`

No description

#### Parameters

| $clientID |

###
at line 537
`wsProcessClientMessage($clientID, $opcode, $data, $dataLength)`

No description

#### Parameters

| $clientID |
| $opcode |
| $data |
| $dataLength |

###
at line 583
`wsProcessClientHandshake($clientID, $buffer)`

No description

#### Parameters

| $clientID |
| $buffer |

###
at line 655
`wsSendClientMessage($clientID, $opcode, $message)`

No description

#### Parameters

| $clientID |
| $opcode |
| $message |

###
at line 717
`wsSendClientClose($clientID, $status = false)`

No description

#### Parameters

| $clientID |
| $status |

###
at line 733
`wsClose($clientID)`

No description

#### Parameters

| $clientID |

###
at line 736
`wsSend($clientID, $message, $binary = false)`

No description

#### Parameters

| $clientID |
| $message |
| $binary |

###
at line 740
`log($message)`

No description

#### Parameters

| $message |

###
at line 745
`bind($type, $func)`

No description

#### Parameters

| $type |
| $func |

###
at line 752
`unbind($type = '')`

No description

#### Parameters

| $type |