class PHTTP: public PInternetProtocol

A common base class for TCP/IP socket for the HyperText Transfer Protocol version 10 client and server

Inheritance:


Protected Methods

[more] PHTTP ()
Create a TCP/IP HTTP protocol channel
[more]virtual PINDEX ParseResponse ( const PString & line )
Parse a response line string into a response code and any extra info on the line.


Inherited from PInternetProtocol:

Public Methods

ovirtual BOOL Read( void * buf, PINDEX len )
ovirtual BOOL Write( const void * buf, PINDEX len )
ovoid SetReadLineTimeout( const PTimeInterval & t )
ovirtual BOOL Connect( const PString & address, WORD port = 0 )
ovirtual BOOL Accept( PSocket & listener )
oconst PString& GetDefaultService() const
oPIPSocket* GetSocket() const
ovirtual BOOL WriteLine( const PString & line )
ovirtual BOOL ReadLine( PString & line, BOOL allowContinuation = FALSE )
ovirtual void UnRead( int ch )
ovirtual BOOL WriteCommand( PINDEX cmdNumber )
ovirtual BOOL ReadCommand( PINDEX & num, PString & args )
ovirtual BOOL WriteResponse( unsigned numericCode, const PString & info )
ovirtual BOOL ReadResponse()
ovirtual int ExecuteCommand( PINDEX cmdNumber )
oint GetLastResponseCode() const
oPString GetLastResponseInfo() const


Inherited from PIndirectChannel:

Public

Construction

Overrides from class PObject

Overrides from class PChannel

Channel establish functions

Protected Fields

oPChannel* readChannel
oBOOL readAutoDelete
oPChannel* writeChannel
oBOOL writeAutoDelete
oPReadWriteMutex channelPointerMutex

Protected Methods

ovirtual BOOL OnOpen()


Inherited from PChannel:

Public Methods

ostatic BOOL ConvertOSError( int libcReturnValue, Errors & lastError, int & osError )

Public

Information functions

Reading functions

Writing functions

Miscellaneous functions

Error functions

Protected Fields

oint os_handle
oErrors lastErrorCode[NumErrorGroups+1]
oint lastErrorNumber[NumErrorGroups+1]
oPINDEX lastReadCount
oPINDEX lastWriteCount
oPTimeInterval readTimeout
oPTimeInterval writeTimeout

Protected Methods

ovirtual BOOL ConvertOSError( int libcReturnValue, ErrorGroup group = LastGeneralError )
oBOOL SetErrorValues( Errors errorCode, int osError, ErrorGroup group = LastGeneralError )
oint ReadCharWithTimeout( PTimeInterval & timeout )


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions


Documentation

A common base class for TCP/IP socket for the HyperText Transfer Protocol version 10 client and server
o PHTTP()
Create a TCP/IP HTTP protocol channel

ovirtual PINDEX ParseResponse( const PString & line )
Parse a response line string into a response code and any extra info on the line. Results are placed into the member variables <CODE>lastResponseCode</CODE> and <CODE>lastResponseInfo</CODE>.

The default bahaviour looks for a space or a '-' and splits the code and info either side of that character, then returns FALSE.

Returns:
Position of continuation character in response, 0 if no continuation lines are possible.


Direct child classes:
PHTTPServer
PHTTPClient

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.