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

Class: NS_Client_Socket

Source Location: /nanoserv.php

Class Overview

NS_Socket
   |
   --NS_Client_Socket

Client socket class


Author(s):

Variables

Constants

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 593]
Client socket class



Tags:

since:  0.9


[ Top ]


Class Variables

$address =

[line 605]

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



Tags:

access:  public

Type:   string


[ Top ]

$connect_timeout =

[line 611]

Connect timeout (timestamp)



Tags:

access:  public

Type:   int


[ Top ]



Class Methods


method Connect [line 655]

bool Connect( [int $timeout = false])

Connect to the peer address



Tags:

since:  0.9
access:  public


Parameters:

int   $timeout   connection timeout in seconds

[ Top ]

constructor __construct [line 616]

NS_Client_Socket __construct( $addr)

NS_Client_Socket constructor



Tags:

access:  public


Overrides NS_Socket::__construct() (NS_Socket contructor)

Parameters:

   $addr  

[ Top ]


Class Constants

CONNECT_TIMEOUT =  10

[line 599]

Connect timeout (seconds)


[ Top ]



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