Pyro higlevel network API
Classes | Public Member Functions | List of all members
net::Datastream Class Reference
Inheritance diagram for net::Datastream:
net::HTTPstream

Classes

class  Private
 

Public Member Functions

 Datastream (Host &cHost)
 
 Datastream (Url &cUrl)
 
virtual ~Datastream ()
 
virtual ssize_t Read (void *pBuffer, ssize_t nSize)
 
virtual ssize_t Write (const void *pBuffer, ssize_t nSize)
 
virtual ssize_t ReadPos (off_t nPos, void *pBuffer, ssize_t nSize)
 
virtual ssize_t WritePos (off_t nPos, const void *pBuffer, ssize_t nSize)
 
virtual off_t Seek (off_t nPos, int nMode)
 
virtual status_t SetBlocking (bool bBlocking=true)
 
virtual bool IsBlocking (void)
 
virtual ssize_t ReadLine (uint8 *pnBuffer, ssize_t nMax, bigtime_t nTimeout=SOCKET_DEFAULT_TIMEOUT)
 
virtual status_t WaitFor (char *pzString, uint8 *pnBuffer, ssize_t nMax, bigtime_t nTimeout=SOCKET_DEFAULT_TIMEOUT)
 
virtual status_t Connect (void)
 
virtual bool IsConnected (void)
 
virtual status_t Disconnect (void)
 

Constructor & Destructor Documentation

Datastream::Datastream ( Host cHost)
Datastream::Datastream ( Url cUrl)
Datastream::~Datastream ( )
virtual

Member Function Documentation

status_t Datastream::Connect ( void  )
virtual
status_t Datastream::Disconnect ( void  )
virtual
bool Datastream::IsBlocking ( void  )
virtual
bool Datastream::IsConnected ( void  )
virtual
ssize_t Datastream::Read ( void *  pBuffer,
ssize_t  nSize 
)
virtual
ssize_t Datastream::ReadLine ( uint8 *  pnBuffer,
ssize_t  nMax,
bigtime_t  nTimeout = SOCKET_DEFAULT_TIMEOUT 
)
virtual
ssize_t Datastream::ReadPos ( off_t  nPos,
void *  pBuffer,
ssize_t  nSize 
)
virtual
off_t Datastream::Seek ( off_t  nPos,
int  nMode 
)
virtual
status_t Datastream::SetBlocking ( bool  bBlocking = true)
virtual
Description
Set the blocking mode of the Socket associated with the Datastream. If the Socket is blocking then I/O methods such as Read() and Write() will not return until either data arrives or the operation times out. If the Socket is non-blocking then these operations will return imediatly if no data is available.
Parameters
bBlockingfalse Make the Socket non-blocking, true makes the Socket blocking. Default is true.
Returns
0 on success.
See Also
IsBlocking()
Author
Kristian Van Der Vliet (vande.nosp@m.rs@l.nosp@m.iqwyd.nosp@m..com)
status_t Datastream::WaitFor ( char *  pzString,
uint8 *  pnBuffer,
ssize_t  nMax,
bigtime_t  nTimeout = SOCKET_DEFAULT_TIMEOUT 
)
virtual
ssize_t Datastream::Write ( const void *  pBuffer,
ssize_t  nSize 
)
virtual

Reimplemented in net::HTTPstream.

ssize_t Datastream::WritePos ( off_t  nPos,
const void *  pBuffer,
ssize_t  nSize 
)
virtual