![]() |
GM6000 Digital Heater Controller Build: 20 (Branch = develop)
SDX-1330
|
This concrete class provides a platform independent 'standard' implementation of an InputOutput stream object where the stream is Socket connection. More...
This concrete class provides a platform independent 'standard' implementation of an InputOutput stream object where the stream is Socket connection.
#include <InputOutput.h>
Public Member Functions | |
| InputOutput () | |
| Constructor. | |
| InputOutput (Cpl::Io::Descriptor fd) | |
| Constructor. | |
| ~InputOutput (void) | |
| Destructor. | |
| void | activate (Cpl::Io::Descriptor fd) |
| Activates the stream, i.e. | |
| bool | read (void *buffer, int numBytes, int &bytesRead) |
| See Cpl::Io::Input. | |
| bool | available () |
| See Cpl::Io::Input. | |
| bool | write (const void *buffer, int maxBytes, int &bytesWritten) |
| See Cpl::Io::Output. | |
| void | flush () |
| See Cpl::Io::Output. | |
| bool | isEos () |
| See Cpl::Io::IsEos. | |
| void | close () |
| See Cpl::Io::Output. | |
Public Member Functions inherited from Cpl::Io::Input | |
| virtual bool | read (char &c) |
| Reads a single byte from the stream. | |
| virtual bool | read (Cpl::Text::String &destString) |
| Reads N bytes into the String's internal buffer. | |
| virtual | ~Input () |
| Lets the make the destructor virtual. | |
Public Member Functions inherited from Cpl::Io::Close | |
| virtual | ~Close () |
| Lets the make the destructor virtual. | |
Public Member Functions inherited from Cpl::Container::Item | |
| bool | insert_ (void *newContainerPtr) |
| Helper method to trap when inserting an item in multiple containers. | |
| bool | isInContainer_ (const void *containerPtr) const noexcept |
| Returns 'true' if the instance is in the specified container. | |
Public Member Functions inherited from Cpl::Io::IsEos | |
| virtual | ~IsEos () |
| Lets the make the destructor virtual. | |
Public Member Functions inherited from Cpl::Io::Output | |
| virtual bool | write (char c) |
| Writes a single byte to the stream. | |
| virtual bool | write (const char *string) |
| Writes a string to the stream. | |
| virtual bool | write (const Cpl::Text::String &string) |
| Writes a string to the stream. | |
| virtual bool | write (Cpl::Text::String &formatBuffer, const char *format,...) |
| Formatted write to the stream. | |
| virtual bool | vwrite (Cpl::Text::String &formatBuffer, const char *format, va_list ap) |
| Same as write( String& formatBuffer, const char* format,...), except that it is called with a va_list instead of a variable number of arguments. | |
| virtual bool | write (const void *buffer, int numBytes) |
| Writes the content of the buffer to the stream. | |
| virtual | ~Output () |
| Lets the make the destructor virtual. | |
Protected Attributes | |
| Cpl::Io::Descriptor | m_fd |
| Socket handle. | |
| bool | m_eos |
| End-of-Stream status. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Cpl::Container::Item | |
| static void | remove_ (Item *itemPtr) noexcept |
| Helper method to do the proper 'clean-up' for the multiple-containers-error-trap when removing an item from a container. | |
Public Attributes inherited from Cpl::Container::Item | |
| void * | m_nextPtr_ |
| The link field. | |
| void * | m_inListPtr_ |
| Debug field. | |
Protected Member Functions inherited from Cpl::Container::Item | |
| Item () | |
| Constructor. | |
| Item (const char *) | |
| Constructor used ONLY with the child class MapItem: -->special constructor to allow a Map to be statically allocated. | |
| Cpl::Io::Socket::InputOutput::InputOutput | ( | ) |
Constructor.
No 'fd' provided -->the instance MUST be activated prior to use.
| Cpl::Io::Socket::InputOutput::InputOutput | ( | Cpl::Io::Descriptor | fd | ) |
Constructor.
'fd' is a the 'socket descriptor' of a existing/opened socket
| Cpl::Io::Socket::InputOutput::~InputOutput | ( | void | ) |
Destructor.
| void Cpl::Io::Socket::InputOutput::activate | ( | Cpl::Io::Descriptor | fd | ) |
Activates the stream, i.e.
initializes the instance's underlying fd/stream descriptor. If instance's 'fd' is not in the closed state when this method is called a fatal error is generated.
|
virtual |
See Cpl::Io::Input.
Implements Cpl::Io::Input.
|
virtual |
See Cpl::Io::Output.
Implements Cpl::Io::Close.
|
virtual |
See Cpl::Io::Output.
Implements Cpl::Io::Output.
|
virtual |
See Cpl::Io::IsEos.
Implements Cpl::Io::IsEos.
|
virtual |
See Cpl::Io::Input.
Implements Cpl::Io::Input.
|
virtual |
See Cpl::Io::Output.
Implements Cpl::Io::Output.
|
protected |
End-of-Stream status.
|
protected |
Socket handle.