Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

fsocket Class Reference
[FSocket-Class]

Inheritance diagram for fsocket:

httpsocket List of all members.

Public Member Functions

 fsocket ()
 Class Constructor.
 _fsocket ()
 Class Destructor.
 fsocket_close ()
 Close fsocket connection.
 fsocket_connect ($host, $port, $timeout=20, $durable=false)
 Connect to server.
 fsocket_flush_errors ()
 Will flush the error list.
 fsocket_flush_stream ()
 Will flush the socket stream.
 fsocket_get_errorlist ()
 Returns error list. After the call the function delete the error list.
 fsocket_get_handle ()
 Returns actual socket handle.
 fsocket_get_host ()
 Returns host name.
 fsocket_get_port ()
 Returns actual port number.
 fsocket_get_socketdata ($endsign="LINE", $linelenght=65535)
 Returns complete socket data array.
 fsocket_get_status ()
 Returns Fsocket status.
 fsocket_get_stream ()
 Returns Fsocket stream. After the call the function delete the stream.
 fsocket_get_timeout ()
 Returns timeout time.
 fsocket_send_socketdata ($data)
 Sends data to socket connection.
 fsocket_set_blocking_mode ($state=true)
 Sets the blocking mode.
 fsocket_set_timeout ($timeout)
 Change the timeout.

Public Attributes

 $fsocket_blocking_mode = true
 $fsocket_durable = false
 $fsocket_error_hdl = 0
 $fsocket_handle = false
 $fsocket_host
 $fsocket_port
 $fsocket_stream_hdl = 0
 $fsocket_timeout = 10

Constructor & Destructor Documentation

function fsocket::fsocket  ) 
 

Class Constructor.


Member Function Documentation

function fsocket::_fsocket  ) 
 

Class Destructor.

function fsocket::fsocket_close  ) 
 

Close fsocket connection.

Returns:
State = true or false

function fsocket::fsocket_connect host,
port,
timeout = 20,
durable = false
 

Connect to server.

Parameters:
$host = Host adress or IP
$port = Port number
$timeout = Timeout
$durable = Set a durable connection
Returns:
State = true or false

function fsocket::fsocket_flush_errors  ) 
 

Will flush the error list.

Returns:
State = true or false

function fsocket::fsocket_flush_stream  ) 
 

Will flush the socket stream.

Returns:
State = true or false

function fsocket::fsocket_get_errorlist  ) 
 

Returns error list. After the call the function delete the error list.

Returns:
Error list array

function fsocket::fsocket_get_handle  ) 
 

Returns actual socket handle.

Returns:
Socket handle

function fsocket::fsocket_get_host  ) 
 

Returns host name.

Returns:
Host name

function fsocket::fsocket_get_port  ) 
 

Returns actual port number.

Returns:
Port number

function fsocket::fsocket_get_socketdata endsign = "LINE",
linelenght = 65535
 

Returns complete socket data array.

Parameters:
$endsign = There are three ways to receive socket data:
  • If you leave the endsign var free, the function reads only one line from the socket file. You could also set "LINE" as parameter. As result you get an data string
  • If you fill the parameter with "EOF", the function reads the data until the sign "EOF" will be reached. As result you get an data array.
  • The third option is to set your own break sign or string. As result you get an data array.
$linelenght = Data read lenght.
Returns:
Socket data array or socket string

function fsocket::fsocket_get_status  ) 
 

Returns Fsocket status.

Returns:
Status array

function fsocket::fsocket_get_stream  ) 
 

Returns Fsocket stream. After the call the function delete the stream.

Returns:
Stream array

function fsocket::fsocket_get_timeout  ) 
 

Returns timeout time.

Returns:
Timeout

function fsocket::fsocket_send_socketdata data  ) 
 

Sends data to socket connection.

Parameters:
$data = Data to send
Returns:
State = true or false

function fsocket::fsocket_set_blocking_mode state = true  ) 
 

Sets the blocking mode.

Parameters:
$state = Blocking mode state
Returns:
State = true or false

function fsocket::fsocket_set_timeout timeout  ) 
 

Change the timeout.

Returns:
State = true or false


Member Data Documentation

fsocket::$fsocket_blocking_mode = true
 

Blocking mode

fsocket::$fsocket_durable = false
 

State of connection type (fsockopen or pfsockopen).

fsocket::$fsocket_error_hdl = 0
 

Error message handler

fsocket::$fsocket_handle = false
 

Socket handle

fsocket::$fsocket_host
 

Host name or IP

fsocket::$fsocket_port
 

Port number

fsocket::$fsocket_stream_hdl = 0
 

Socket stream array

fsocket::$fsocket_timeout = 10
 

Connection timeout


The documentation for this class was generated from the following file:
Generated on Fri Aug 26 08:13:53 2005 for PHP-Lib-Xtreme by  doxygen 1.4.3