VCF::UDPSocketInputStream Class Reference
An input stream class used for reading data from a UDP socket. More...
#include <vcf/NetworkKit/Socket.h>
Inheritance diagram for VCF::UDPSocketInputStream:

Public Member Functions | |
| UDPSocketInputStream (UDPSocket &socket, const IPEndPoint &readFrom) | |
| virtual void | seek (const uint64 &offset, const SeekType &offsetFrom) |
| Seeking is not permitted! | |
| virtual uint64 | getSize () |
| returns the size of the stream. | |
| virtual uchar * | getBuffer () |
| Returns NULL - this is not permitted. | |
| virtual uint64 | getCurrentSeekPos () |
| this is a global offset from the beggining of the stream | |
| virtual bool | isEOS () |
| virtual uint64 | read (unsigned char *bytesToRead, uint64 sizeOfBytes) |
| Attempts to read sizeOfBytes from the UDP socket associated with this stream. | |
| uint64 | readFrom (unsigned char *bytesToRead, uint64 sizeOfBytes, IPEndPoint &from) |
| Reads from the specified end point. | |
Protected Attributes | |
| uint64 | totalBytesRecvd_ |
| Socket * | socket_ |
| IPEndPoint | readFrom_ |
Detailed Description
An input stream class used for reading data from a UDP socket.The class must be used in conjunction with a valid socket instance, you cannot create in instance otherwise. Not all of the InputStream class's methods can be implemented, for example, the seek method is meaningless in this context, and calling it will result in a NetworkException being thrown. The only method that makes sense to call is the read() method.
Constructor & Destructor Documentation
|
||||||||||||
|
|
Member Function Documentation
|
|
Returns NULL - this is not permitted.
Implements VCF::Stream. |
|
|
this is a global offset from the beggining of the stream
Implements VCF::Stream. |
|
|
returns the size of the stream. The size represents the number of bytes that have been written, or read to/from the stream Implements VCF::Stream. |
|
|
Implements VCF::InputStream. |
|
||||||||||||
|
Attempts to read sizeOfBytes from the UDP socket associated with this stream. The method will return the number of bytes read from the socket. The return may be the following:
Implements VCF::InputStream. |
|
||||||||||||||||
|
Reads from the specified end point.
|
|
||||||||||||
|
Seeking is not permitted!
Implements VCF::Stream. |
Member Data Documentation
|
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/NetworkKit/Socket.h
