VCF::TCPSocketOutputStream Class Reference
An output stream class used for writing data to a TCP socket. More...
#include <vcf/NetworkKit/Socket.h>
Inheritance diagram for VCF::TCPSocketOutputStream:

Public Member Functions | |
| TCPSocketOutputStream (TCPSocket &socket) | |
| 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 uint64 | write (const unsigned char *bytesToWrite, uint64 sizeOfBytes) |
| Attempts to write sizeOfBytes to the TCP socket associated with this stream. | |
Protected Attributes | |
| uint64 | totalBytesWritten_ |
| Socket * | socket_ |
Detailed Description
An output stream class used for writing data to a TCP socket.The class must be used in conjunction with a valid socket instance, you cannot create in instance otherwise. Not all of the OutputStream class's methods can be implemented, for example, the seek method is meaningless in this context, and calling it will result in a RuntimeException being thrown. The only method that makes sense to call is the write() 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. |
|
||||||||||||
|
Seeking is not permitted!
Implements VCF::Stream. |
|
||||||||||||
|
Attempts to write sizeOfBytes to the TCP socket associated with this stream. The method will return the number of bytes written to the socket. The return value may be the following:
Implements VCF::OutputStream. |
Member Data Documentation
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/NetworkKit/Socket.h
