Documentation

Server
in package

Класс запускающий сервер

Table of Contents

Properties

$host  : string
Текущий хост
$port  : int
Текущий порт
$socket  : resource
Привязанный сокет

Methods

__construct()  : void
Конструктор нового экземпляра Server
listen()  : void
Ожидание запросов
bind()  : void
Привязка ресурса сокета
createSocket()  : void
Создание нового ресурса сокета

Properties

$host

Текущий хост

protected string $host = null

$port

Текущий порт

protected int $port = null

$socket

Привязанный сокет

protected resource $socket = null

Methods

__construct()

Конструктор нового экземпляра Server

public __construct(string $host, int $port) : void
Parameters
$host : string
$port : int

listen()

Ожидание запросов

public listen(callable $callback, mixed $init_callback) : void
Parameters
$callback : callable
$init_callback : mixed

bind()

Привязка ресурса сокета

protected bind() : void
Tags
throws
Exception

createSocket()

Создание нового ресурса сокета

protected createSocket() : void

        
On this page

Search results