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

Class: NS_Datagram_Handler

Source Location: /nanoserv.php

Class Overview

NS_Handler
   |
   --NS_Datagram_Handler

Datagram listener / handler class


Author(s):

Variables

Methods


Child classes:

NS_Syslog_Handler
Syslog protocol handler handler class
NS_DHCP_Handler
DHCP protocol handler handler class

Inherited Variables

Inherited Methods

Class: NS_Handler

NS_Handler::Set_Option()
Set a stream context option

Class Details

[line 1043]
Datagram listener / handler class



Tags:

abstract:  
since:  0.9.61


[ Top ]


Class Variables

$active =  false

[line 1049]

Is the listener active ?



Tags:

access:  public

Type:   bool


[ Top ]



Class Methods


constructor __construct [line 1058]

NS_Datagram_Handler __construct( string $addr, string $handler_classname, mixed $handler_options)

NS_Datagram_Handler constructor



Tags:

access:  public


Parameters:

string   $addr  
string   $handler_classname  
mixed   $handler_options  

[ Top ]

destructor __destruct [line 1130]

void __destruct( )

NS_Datagram_Handler destructor



Tags:

access:  public


[ Top ]

method Activate [line 1070]

bool Activate( )

Activate the listener



Tags:

since:  0.9.61
access:  public


[ Top ]

method Deactivate [line 1090]

void Deactivate( [ $close_socket = true])

Deactivate the listener



Tags:

since:  0.9.61
access:  public


Parameters:

   $close_socket  

[ Top ]

method on_Read [line 1123]

void on_Read( string $from, string $data)

Event called on data reception



Tags:

since:  0.9.61
access:  public


Overridden in child classes as:

NS_Syslog_Handler::on_Read()
NS_DHCP_Handler::on_Read()

Parameters:

string   $from  
string   $data  

[ Top ]

method Write [line 1110]

int Write( string $to, string $data)

Send data over the connection



Tags:

since:  0.9.61
access:  public


Parameters:

string   $to   in the form of "<ip_address>:<port>"
string   $data  

[ Top ]


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