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_HTTP_Service_Handler
Connection handler class
NS_Line_Input_Connection_Handler
Line input connection handler class
NS_Telnet_Handler
Telnet protocol handler handler class

Inherited Variables

Inherited Methods

Class: NS_Handler

NS_Handler::Set_Option()
Set a stream context option

Class Details

[line 1147]
Connection handler class



Tags:

abstract:  
since:  0.9


[ Top ]


Class Methods


method Connect [line 1192]

void Connect( [int $timeout = false])

Connect



Tags:

since:  0.9
access:  public


Parameters:

int   $timeout   timeout in seconds

[ Top ]

method Disconnect [line 1211]

void Disconnect( )

Disconnect



Tags:

access:  public


[ Top ]

method on_Accept [line 1223]

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 1231]

void on_Connect( )

Event called on established connection



Tags:

since:  0.9
access:  public


[ Top ]

method on_Connect_Fail [line 1241]

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 1249]

void on_Disconnect( )

Event called on disconnection



Tags:

since:  0.9
access:  public


[ Top ]

method on_Fork_Done [line 1277]

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 1268]

void on_Fork_Prepare( )

Event called before forking



Tags:

since:  2.0
access:  public


[ Top ]

method on_Read [line 1259]

void on_Read( string $data)

Event called on data reception



Tags:

since:  0.9
access:  public


Overridden in child classes as:

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

Parameters:

string   $data  

[ Top ]

method Write [line 1166]

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 1180]

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 1153]

Cause of connection failure


[ Top ]

FAIL_CRYPTO =  3

[line 1155]

Cause of connection failure


[ Top ]

FAIL_TIMEOUT =  2

[line 1154]

Cause of connection failure


[ Top ]



Documentation generated on Wed, 25 Aug 2010 20:20:16 +0200 by phpDocumentor 1.4.3