nanoserv
[ class tree: nanoserv ] [ index: nanoserv ] [ all elements ]

Class: NS_Listener

Source Location: /nanoserv.php

Class Overview


Listener class


Author(s):

Variables

Methods



Class Details

[line 1290]
Listener class



Tags:

since:  0.9


[ Top ]


Class Variables

$active =  false

[line 1318]

Is the listener active ?



Tags:

access:  public

Type:   bool


[ Top ]

$forking =  false

[line 1324]

If set the listener will fork() a new process for each accepted connection



Tags:

access:  public

Type:   bool


[ Top ]

$handler_classname =

[line 1303]

Name of the handler class



Tags:

see:  NS_Connetion_Handler
access:  public

Type:   string


[ Top ]

$handler_options =

[line 1312]

Handler options

this is passed as the first constructor parameter of each spawned connection handlers




Tags:

access:  public

Type:   mixed


[ Top ]

$socket =

[line 1296]

Attached socket



Tags:

access:  public

Type:   NS_Server_Socket


[ Top ]



Class Methods


constructor __construct [line 1333]

NS_Listener __construct( string $addr, string $handler_classname, [mixed $handler_options = false], [ $forking = false])

NS_Listener constructor



Tags:

access:  public


Parameters:

string   $addr  
string   $handler_classname  
mixed   $handler_options  
   $forking  

[ Top ]

destructor __destruct [line 1410]

void __destruct( )

NS_Listener destructor



Tags:

access:  public


[ Top ]

method Activate [line 1380]

bool Activate( )

Activate the listener



Tags:

since:  0.9
access:  public


[ Top ]

method Deactivate [line 1400]

void Deactivate( )

Deactivate the listener



Tags:

since:  0.9
access:  public


[ Top ]

method Set_Forking [line 1364]

bool Set_Forking( [bool $forking = true])

Sets wether the listener should fork() a new process for each accepted connection



Tags:

since:  0.9
access:  public


Parameters:

bool   $forking  

[ Top ]

method Set_Option [line 1351]

bool Set_Option( string $wrapper, string $opt, mixed $val)

Set a stream context option



Tags:

since:  0.9
access:  public


Parameters:

string   $wrapper  
string   $opt  
mixed   $val  

[ Top ]


Documentation generated on Thu, 10 May 2012 22:01:24 +0200 by phpDocumentor 1.4.4