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

Class: NS_Server_Socket

Source Location: /nanoserv.php

Class Overview

NS_Socket
   |
   --NS_Server_Socket

Server socket class


Author(s):

Variables

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: NS_Socket

NS_Socket::__construct()
NS_Socket contructor
NS_Socket::Block_Reads()
Flag the socket so that the main loop won't read from it even if data is available.
NS_Socket::Close()
Close the socket
NS_Socket::Enable_Crypto()
Enable or disable ssl/tls crypto on the socket
NS_Socket::Eof()
Query end of stream status
NS_Socket::Get_Name()
Get local socket name
NS_Socket::Get_Options()
Get stream options
NS_Socket::Get_Peer_Name()
Get remote socket name
NS_Socket::Read()
Read data from the socket and return it
NS_Socket::Read_From()
Read data from a non connected socket and return it
NS_Socket::Setup()
Setup crypto if needed
NS_Socket::Set_Blocking()
Sets wether the socket is blocking or not
NS_Socket::Set_Option()
Set a stream context option
NS_Socket::Set_Timeout()
Set timeout
NS_Socket::Set_Write_Buffer()
Set the stream write buffer (PHP defaults to 8192 bytes)
NS_Socket::Write()
Write data to the socket
NS_Socket::Write_From_Stream()
Write data from stream to socket
NS_Socket::Write_To()
Write data to a non connected socket
NS_Socket::__destruct()
NS_Socket destructor

Class Details

[line 488]
Server socket class



Tags:

since:  0.9


[ Top ]


Class Variables

$address =

[line 494]

Listen address (format is 'proto://addr:port')



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


constructor __construct [line 505]

NS_Server_Socket __construct( $addr)

NS_Server_Socket constructor



Tags:

access:  public


Overrides NS_Socket::__construct() (NS_Socket contructor)

Parameters:

   $addr  

[ Top ]

method Accept [line 577]

resource Accept( )

Accept connection



Tags:

since:  0.9
access:  public


[ Top ]

method Listen [line 552]

bool Listen( [ $bind_only = false])

Start listening and accepting connetions



Tags:

since:  0.9
access:  public


Parameters:

   $bind_only  

[ Top ]


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