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

Class: NS_Connection_Handler

Source Location: /nanoserv.php

Class Overview

NS_Handler
   |
   --NS_Connection_Handler

Connection handler class


Author(s):

Constants

Methods


Child classes:

NS_Telnet_Handler
Telnet protocol handler handler class
NS_Line_Input_Connection_Handler
Line input connection handler class
NS_HTTP_Service_Handler
Connection handler class

Inherited Variables

Inherited Methods

Class: NS_Handler

NS_Handler::Set_Option()
Set a stream context option

Class Details

[line 1146]
Connection handler class



Tags:

abstract:  
since:  0.9


[ Top ]


Class Methods


method Connect [line 1191]

void Connect( [int $timeout = false])

Connect



Tags:

since:  0.9
access:  public


Parameters:

int   $timeout   timeout in seconds

[ Top ]

method Disconnect [line 1210]

void Disconnect( )

Disconnect



Tags:

access:  public


[ Top ]

method on_Accept [line 1222]

void on_Accept( )

Event called on received connection



Tags:

since:  0.9
access:  public


Overridden in child classes as:

NS_SMTP_Service_Handler::on_Accept()

[ Top ]

method on_Connect [line 1230]

void on_Connect( )

Event called on established connection



Tags:

since:  0.9
access:  public


[ Top ]

method on_Connect_Fail [line 1240]

void on_Connect_Fail( int $failcode)

Event called on failed connection



Tags:

since:  0.9
access:  public


Parameters:

int   $failcode   see NS_Connection_Handler::FAIL_* constants

[ Top ]

method on_Disconnect [line 1248]

void on_Disconnect( )

Event called on disconnection



Tags:

since:  0.9
access:  public


[ Top ]

method on_Fork_Done [line 1276]

void on_Fork_Done( )

Event called after forking, both on master and child processes



Tags:

since:  2.0
access:  public


[ Top ]

method on_Fork_Prepare [line 1267]

void on_Fork_Prepare( )

Event called before forking



Tags:

since:  2.0
access:  public


[ Top ]

method on_Read [line 1258]

void on_Read( string $data)

Event called on data reception



Tags:

since:  0.9
access:  public


Overridden in child classes as:

NS_Telnet_Handler::on_Read()
NS_Line_Input_Connection_Handler::on_Read()
NS_HTTP_Service_Handler::on_Read()

Parameters:

string   $data  

[ Top ]

method Write [line 1165]

NS_Static_Write_Buffer Write( string $data, [mixed $callback = false])

Send data over the connection



Tags:

since:  0.9
access:  public


Overridden in child classes as:

NS_Telnet_Handler::Write()

Parameters:

string   $data  
mixed   $callback  

[ Top ]

method Write_Stream [line 1179]

NS_Stream_Write_Buffer Write_Stream( resource $stream, [mixed $callback = false])

Send open stream over the connection



Tags:

since:  2.1
access:  public


Parameters:

resource   $stream  
mixed   $callback  

[ Top ]


Class Constants

FAIL_CONNREFUSED =  1

[line 1152]

Cause of connection failure


[ Top ]

FAIL_CRYPTO =  3

[line 1154]

Cause of connection failure


[ Top ]

FAIL_TIMEOUT =  2

[line 1153]

Cause of connection failure


[ Top ]



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