class PHTTPClient

A TCP/IP socket for the HyperText Transfer Protocol version 10.

Inheritance:



Inherited from PHTTP:

Protected Methods

ovirtual PINDEX ParseResponse( const PString & 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 Methods

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

Information functions

Reading functions

Writing functions

Miscellaneous functions

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

Public Members

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 Methods

Run Time Type functions

I/O functions

Public Members

Comparison functions


Documentation

A TCP/IP socket for the HyperText Transfer Protocol version 10.

When acting as a client, the procedure is to make the connection to a remote server, then to retrieve a document using the following procedure: <PRE><CODE> PHTTPSocket web("webserver"); if (web.IsOpen()) { PINDEX len; if (web.GetDocument("http://www.someone.com/somewhere/url", len)) { PString html = web.ReadString(len); if (!html.IsEmpty()) ProcessHTML(html); } else PError << "Could not get page." << endl; } else PError << "HTTP conection failed." << endl; </PRE></CODE>


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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