|
evio
5.3
|
Implements evioChannel functionality for I/O to and from socket. More...
#include <evioSocketChannel.hxx>
Public Member Functions | |
| evioSocketChannel (int socFd, const string &mode="r", int size=100000) | |
| Constructor opens socket for reading or writing. More... | |
| evioSocketChannel (int socFd, evioDictionary *dict, const string &mode="r", int size=100000) | |
| Constructor opens socket for reading or writing. More... | |
| virtual | ~evioSocketChannel () |
| Destructor closes socket, deletes internal buffer. More... | |
| void | open () |
| Opens channel for reading or writing. More... | |
| bool | read () |
| Reads from socket. More... | |
| bool | read (uint32_t *myEventBuf, int length) |
| Reads from socket into user-supplied event buffer. More... | |
| bool | readAlloc (uint32_t **buffer, uint32_t *bufLen) |
| Reads from socket and allocates buffer as needed. More... | |
| bool | readNoCopy () |
| Reads from socket using no copy mechanism. More... | |
| void | write () |
| Writes to socket from internal buffer. More... | |
| void | write (const uint32_t *myEventBuf) |
| Writes to socket from user-supplied buffer. More... | |
| void | write (const evioChannel &channel) |
| Writes to socket from internal buffer of another evioChannel object. More... | |
| void | write (const evioChannel *channel) |
| Writes from internal buffer of another evioChannel object. More... | |
| void | write (const evioChannelBufferizable &o) |
| Writes from contents of evioChannelBufferizable object. More... | |
| void | write (const evioChannelBufferizable *o) |
| Writes from contents of evioChannelBufferizable object. More... | |
| void | close () |
| Closes channel. More... | |
| int | ioctl (const string &request, void *argp) |
| For getting and setting evIoctl parameters. More... | |
| const uint32_t * | getBuffer () const |
| Returns pointer to internal channel buffer. More... | |
| int | getBufSize () const |
| Returns internal channel buffer size. More... | |
| const uint32_t * | getNoCopyBuffer () const |
| Returns pointer to no copy buffer. More... | |
| string | getMode () const |
| Returns channel I/O mode. More... | |
| int | getSocketFD () const |
| Returns socket file descriptor. More... | |
| string | getSocketXMLDictionary () const |
| Returns XML dictionary read in from socket. More... | |
Public Member Functions inherited from evio::evioChannel | |
| evioChannel () | |
| evioChannel (evioDictionary *dict) | |
| virtual | ~evioChannel () |
| virtual bool | readRandom (uint32_t eventNumber) |
| virtual const evioDictionary * | getDictionary () const |
| virtual const uint32_t * | getRandomBuffer () const |
| virtual void | getRandomAccessTable (uint32_t ***const table, uint32_t *len) const |
Additional Inherited Members | |
Protected Attributes inherited from evio::evioChannel | |
| evioDictionary * | dictionary |
Implements evioChannel functionality for I/O to and from socket.
| evioSocketChannel::evioSocketChannel | ( | int | sockFD, |
| const string & | m = "r", |
||
| int | size = 100000 |
||
| ) |
Constructor opens socket for reading or writing.
| sockFD | Socket file descriptor |
| m | I/O mode, "r" or "w" |
| size | Internal event buffer size |
| evioSocketChannel::evioSocketChannel | ( | int | sockFD, |
| evioDictionary * | dict, | ||
| const string & | m = "r", |
||
| int | size = 100000 |
||
| ) |
Constructor opens socket for reading or writing.
| sockFD | Socket file descriptor |
| dict | Dictionary |
| m | I/O mode, "r" or "w" |
| size | Internal event buffer size |
|
virtual |
Destructor closes socket, deletes internal buffer.
References close(), and evio::evioChannel::dictionary.
|
virtual |
|
virtual |
Returns pointer to internal channel buffer.
Implements evio::evioChannel.
|
virtual |
Returns internal channel buffer size.
Implements evio::evioChannel.
| string evioSocketChannel::getMode | ( | ) | const |
Returns channel I/O mode.
|
virtual |
Returns pointer to no copy buffer.
Implements evio::evioChannel.
| int evioSocketChannel::getSocketFD | ( | ) | const |
Returns socket file descriptor.
| string evioSocketChannel::getSocketXMLDictionary | ( | ) | const |
Returns XML dictionary read in from socket.
|
virtual |
For getting and setting evIoctl parameters.
| request | String containing evIoctl parameters |
| argp | Additional evIoctl parameter |
Implements evio::evioChannel.
|
virtual |
Opens channel for reading or writing.
For read, user-supplied dictionary overrides one received from socket.
Implements evio::evioChannel.
References evio::evioChannel::dictionary, and evio::evioDictionary::getDictionaryXML().
|
virtual |
Reads from socket.
Implements evio::evioChannel.
|
virtual |
Reads from socket into user-supplied event buffer.
| myBuf | User-supplied buffer. @parem length Length of buffer in 4-byte words. |
Implements evio::evioChannel.
|
virtual |
Reads from socket and allocates buffer as needed.
| buffer | Pointer to pointer to allocated buffer. |
| len | Length of allocated buffer in 4-byte words. |
Note: user MUST free the allocated buffer!
Implements evio::evioChannel.
|
virtual |
Reads from socket using no copy mechanism.
Implements evio::evioChannel.
|
virtual |
|
virtual |
Writes to socket from internal buffer of another evioChannel object.
| channel | Channel object |
Implements evio::evioChannel.
References evio::evioChannel::getBuffer().
|
virtual |
Writes from internal buffer of another evioChannel object.
| channel | Pointer to channel object |
Implements evio::evioChannel.
References write().
|
virtual |
Writes from contents of evioChannelBufferizable object.
| o | evioChannelBufferizable object that can serialize to socket |
Implements evio::evioChannel.
References evio::evioChannelBufferizable::toEVIOBuffer(), and write().
|
virtual |
Writes from contents of evioChannelBufferizable object.
| o | Pointer to evioChannelBufferizable object that can serialize to socket |
Implements evio::evioChannel.
References write().
|
virtual |
Writes to socket from user-supplied buffer.
| myBuf | Buffer containing event |
Implements evio::evioChannel.