BlueShoes Application Framework made with PHP http://www.blueshoes.org/


Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: C:/usr/local/lib/php/blueshoes-4.2/core/net/Bs_NetApplication.class.php
BlueShoes Application Framework - net

Bs_NetApplication

Bs_Object
   |
  +-- Bs_NetApplication

Helper Class for net applications which may extend this one.

 

public class Bs_NetApplication extends Bs_Object

Helper Class for net applications which may extend this one.
It offers 2 Bs_SocketClients, the main one and a temporary one, plus theconnect() and disconnect() methods. (see var $this->_Bs_SocketClient_Temp)dependencies: Net/Bs_SocketClient, Net/Bs_Url

Authors
Version4.0.$id$
Copyrightblueshoes.org

 
Direct known subclasses: Bs_EmailValidator, Bs_Smtp, Bs_HttpClient

Methods inherited from Bs_Object

isex, isexception, tostring, tohtml, persist, unpersist, bs_object, bbsetoutput, bbawake, bbisawake, bbxmsg, bbxfunctionstart, bbxfunctionend, bbxecho, bbxvar, bbxvardump, bbforcetrace, bbbufferstart, bbbufferget, bbbufferendflush, bbbufferendclean

Public Method Summary

bool

connect(string $host, [ string $port, string $persistent, string $timeOut, string $blocking ])

Make the connection.
void

disconnect()

Close the connection if it was open.
void

Bs_NetApplication()

Warning: documentation is missing.

Private Method Summary

void

_raiseError()

you have to overwrite this method.

Public Field Summary

object [unknown]

$Bs_Url

actually now i don't see why this is needed here. afaisee it's not even in use in this file. --andrej 2001/09/06
string

$host

the host we work on, eg 'your.server.com' or '111.111.111.111'.
string

$port

the port we send to. expected to be overwritten.

Private Field Summary

string

$_Bs_SocketClient

Our main connection to the world.
string

$_Bs_SocketClient_Temp

The 2nd (temp) connection.
string

$_useTempConnection

Tells if we should use the temp connection.
unknown

$this

Private Constant Summary

BS_NETAPPLICATION_VERSION >>4.0.$x$<< Warning: documentation is missing.

Public Method Details

connect

public bool connect( string $host, [ string $port, string $persistent, string $timeOut, string $blocking ] )

  Make the connection.
this method updates the object vars $host and $port.

Parameter
string $host
like 'your.server.com' or an ip address like '111.111.111.111'.
string $port = >>NULL,<<
the tcp port number.
string $persistent = >>FALSE,<<
default is FALSE.
string $timeOut = >>NULL,<<
for temp conn default is 0, for main conn it's 30.
string $blocking = >>TRUE<<
default is TRUE, see Bs_SocketClient->setBlocking().
Returns bool

true on success, on failure see throw
@throw bs_exception


disconnect

public void disconnect( )

  Close the connection if it was open.

Returns void


Bs_NetApplication

public void Bs_NetApplication( )

 

Warning: documentation is missing.

Returns void


Private Method Details

_raiseError

private void _raiseError( )

  you have to overwrite this method.

Returns void


Public Field Details

$Bs_Url

public object [unknown] $Bs_Url

>><<

actually now i don't see why this is needed here. afaisee it's not even in use in this file. --andrej 2001/09/06


$host

public string $host

>>NULL<<

the host we work on, eg 'your.server.com' or '111.111.111.111'.


$port

public string $port

>>NULL<<

the port we send to. expected to be overwritten.


Private Field Details

$_Bs_SocketClient

private string $_Bs_SocketClient

>>NULL<<

Our main connection to the world.


$_Bs_SocketClient_Temp

private string $_Bs_SocketClient_Temp

>>NULL<<

The 2nd (temp) connection.
you may ask 'why do we need a 2nd connection?'short answer: to keep the main connection open while performing arequest to another host.long answer: case 1: (http example)you can open a connection and get 10 files, then close.by accident the 5th file was on another host. thanks tothe temp connection we don't loose the main one.case 2: (http example)we have to follow a redirect, but the new url is onanother host.


$_useTempConnection

private string $_useTempConnection

>>FALSE<<

Tells if we should use the temp connection.


$this

private unknown $this

>><<



Private Constant Details

BS_NETAPPLICATION_VERSION

define( BS_NETAPPLICATION_VERSION, >>4.0.$x$<< )
Case: default: case sensitive




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta