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

Class: NS_IPC_Socket

Source Location: /nanoserv.php

Class Overview

NS_Socket
   |
   --NS_IPC_Socket

IPC 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 689]
IPC Socket class



Tags:

since:  0.9


[ Top ]


Class Variables

$pid =

[line 701]

pid number of the remote forked process



Tags:

access:  public

Type:   int


[ Top ]



Class Methods


static method Pair [line 742]

static array Pair( [int $domain = STREAM_PF_UNIX], [int $type = STREAM_SOCK_DGRAM], [int $proto = 0])

Creates a pair of connected, indistinguishable pipes

Returns an array of two NS_IPC_Socket objects




Tags:

since:  0.9
access:  public


Parameters:

int   $domain  
int   $type  
int   $proto  

[ Top ]

constructor __construct [line 709]

NS_IPC_Socket __construct( resource $fd, [int $pid = false])

IPC Socket constructor



Tags:

access:  public


Overrides NS_Socket::__construct() (NS_Socket contructor)

Parameters:

resource   $fd  
int   $pid  

[ Top ]

method Ask_Master [line 758]

mixed Ask_Master( array $request, [bool $need_response = true])

Ask the master process for object data



Tags:

since:  0.9
access:  public


Parameters:

array   $request  
bool   $need_response  

[ Top ]

method Read [line 725]

string Read( )

Read data from IPC socket



Tags:

since:  0.9
access:  public


Overrides NS_Socket::Read() (Read data from the socket and return it)

[ Top ]


Class Constants

IPC_MAX_PACKET_SIZE =  1048576

[line 695]

Maximum size of inter process communication packets


[ Top ]



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