PHP 클래스 Workerman\WebServer

상속: extends Worker
파일 보기 프로젝트 열기: walkor/workerman 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_onWorkerStart callback Used to save user OnWorkerStart callback settings.
$mimeTypeMap array Mime mapping.
$serverRoot Virtual host to path mapping.

공개 메소드들

메소드 설명
__construct ( string $socket_name, array $context_option = [] ) Construct.
addRoot ( string $domain, string $root_path ) : void Add virtual host.
initMimeTypeMap ( ) : void Init mime map.
onMessage ( TcpConnection $connection ) : void Emit when http message coming.
onWorkerStart ( ) Emit when process start.
run ( ) Run webserver instance.
sendFile ( $connection, $file_path )

메소드 상세

__construct() 공개 메소드

Construct.
public __construct ( string $socket_name, array $context_option = [] )
$socket_name string
$context_option array

addRoot() 공개 메소드

Add virtual host.
public addRoot ( string $domain, string $root_path ) : void
$domain string
$root_path string
리턴 void

initMimeTypeMap() 공개 메소드

Init mime map.
public initMimeTypeMap ( ) : void
리턴 void

onMessage() 공개 메소드

Emit when http message coming.
public onMessage ( TcpConnection $connection ) : void
$connection Workerman\Connection\TcpConnection
리턴 void

onWorkerStart() 공개 메소드

Emit when process start.
public onWorkerStart ( )

run() 공개 메소드

Run webserver instance.
public run ( )

sendFile() 공개 정적인 메소드

public static sendFile ( $connection, $file_path )

프로퍼티 상세

$_onWorkerStart 보호되어 있는 프로퍼티

Used to save user OnWorkerStart callback settings.
protected callback $_onWorkerStart
리턴 callback

$mimeTypeMap 보호되어 있는 정적으로 프로퍼티

Mime mapping.
protected static array $mimeTypeMap
리턴 array

$serverRoot 보호되어 있는 프로퍼티

Virtual host to path mapping.
protected $serverRoot