# ISocketStream

from pandac.PandaModules import ISocketStream

Class : ISocketStream
Description : This is a base class for istreams implemented in Panda that read from a (possibly non-blocking) socket. It adds is_closed(), which can be called after an eof condition to check whether the socket has been closed, or whether more data may be available later.

## Inheritance:

ISocketStream: istream SSReader
istream: ios
ios: ios_base
ios_base:
SSReader:

## Methods of ISocketStream:

close
getReadState
isClosed

## Methods of istream:

get
seekg
tellg

## Methods of ios:

bad
clear
eof
fail
good

## Methods of SSReader:

close
isClosed
receiveDatagram

## Constants in ISocketStream:

RSInitial | (ReadState)
RSReading | (ReadState)
RSComplete | (ReadState)
RSError | (ReadState)

## Constants in ios_base:

beg | (seekdir)
cur | (seekdir)
end | (seekdir)

close virtual void ISocketStream::close(void) = 0; Undocumented function.

getReadState virtual ISocketStream::ReadState ISocketStream::get_read_state(void) = 0; Undocumented function.

isClosed virtual bool ISocketStream::is_closed(void) = 0; Undocumented function.

get int istream::get(void); Undocumented function.

seekg void istream::seekg(unsigned long int pos); Undocumented function.

tellg unsigned long int istream::tellg(void); Undocumented function.

bad bool ios::bad(void) const; Undocumented function.

clear void ios::clear(void); Undocumented function.

eof bool ios::eof(void) const; Undocumented function.

fail bool ios::fail(void) const; Undocumented function.

good bool ios::good(void) const; Undocumented function.

close virtual void SSReader::close(void) = 0; Undocumented function.

isClosed virtual bool SSReader::is_closed(void) = 0; Undocumented function.

receiveDatagram bool SSReader::receive_datagram(Datagram &dg); Description: Receives a datagram over the socket by expecting a little-endian 16-bit byte count as a prefix. If the socket stream is non-blocking, may return false if the data is not available; otherwise, returns false only if the socket closes.