Arikaim CMS

WebSocketServer extends AbstractServer
in package
implements ServerInterface

Arikaim web socket swoole server

Table of Contents

Interfaces

ServerInterface
Server interface

Constants

DEFAULT_HOST  = 'locahost'
DEFAULT_PORT  = '8080'
STATUS_RUNNING  = 'run'
STATUS_STOP  = 'stop'

Properties

$host  : string
Server host
$options  : array<string|int, mixed>
Server options
$port  : string
Server port
$server  : Server|null
Http server swoole instance
$webSocketApp  : WebSocketAppInterface|null
Web socket app instance

Methods

__construct()  : mixed
Constructor
boot()  : void
Boot server
consoleMsg()  : void
Show console messge
getOption()  : mixed
Get option
hostToString()  : string
Get server host with port
run()  : void
Run server
stop()  : void
Stop server

Constants

Properties

$options

Server options

protected array<string|int, mixed> $options

Methods

__construct()

Constructor

public __construct([string $host = null ][, string $port = null ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$host : string = null
$port : string = null
$options : array<string|int, mixed> = []

consoleMsg()

Show console messge

public consoleMsg(string $message) : void
Parameters
$message : string

getOption()

Get option

public getOption(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string
$default : mixed = null

hostToString()

Get server host with port

public hostToString() : string
Return values
string

        
On this page

Search results