|
OpenSDN source code
|
#include <TFDTransport.h>


Public Types | |
| enum | ClosePolicy { NO_CLOSE_ON_DESTROY = 0 , CLOSE_ON_DESTROY = 1 } |
Public Member Functions | |
| TFDTransport (int fd, ClosePolicy close_policy=NO_CLOSE_ON_DESTROY) | |
| ~TFDTransport () | |
| bool | isOpen () |
| void | open () |
| void | close () |
| int32_t | read (uint8_t *buf, uint32_t len) |
| int32_t | write (const uint8_t *buf, uint32_t len) |
| void | setFD (int fd) |
| int | getFD () |
Public Member Functions inherited from contrail::sandesh::transport::TVirtualTransport< TFDTransport > | |
| virtual int32_t | read_virt (uint8_t *buf, uint32_t len) |
| virtual int32_t | readAll_virt (uint8_t *buf, uint32_t len) |
| virtual int | write_virt (const uint8_t *buf, uint32_t len) |
| virtual const uint8_t * | borrow_virt (uint8_t *buf, uint32_t *len) |
| virtual void | consume_virt (uint32_t len) |
| uint32_t | readAll (uint8_t *buf, uint32_t len) |
Public Member Functions inherited from contrail::sandesh::transport::TTransportDefaults | |
| uint32_t | read (uint8_t *buf, uint32_t len) |
| uint32_t | readAll (uint8_t *buf, uint32_t len) |
| int | write (const uint8_t *buf, uint32_t len) |
| const uint8_t * | borrow (uint8_t *buf, uint32_t *len) |
| void | consume (uint32_t len) |
Public Member Functions inherited from contrail::sandesh::transport::TTransport | |
| virtual | ~TTransport () |
| virtual bool | peek () |
| int32_t | read (uint8_t *buf, uint32_t len) |
| int32_t | readAll (uint8_t *buf, uint32_t len) |
| virtual uint32_t | readEnd () |
| int | write (const uint8_t *buf, uint32_t len) |
| virtual uint32_t | writeEnd () |
| virtual void | flush () |
| const uint8_t * | borrow (uint8_t *buf, uint32_t *len) |
| void | consume (uint32_t len) |
Protected Attributes | |
| int | fd_ |
| ClosePolicy | close_policy_ |
Additional Inherited Members | |
Protected Member Functions inherited from contrail::sandesh::transport::TVirtualTransport< TFDTransport > | |
| TVirtualTransport () | |
| TVirtualTransport (Arg_ const &arg) | |
| TVirtualTransport (Arg1_ const &a1, Arg2_ const &a2) | |
Protected Member Functions inherited from contrail::sandesh::transport::TTransportDefaults | |
| TTransportDefaults () | |
Protected Member Functions inherited from contrail::sandesh::transport::TTransport | |
| TTransport () | |
Dead-simple wrapper around a file descriptor.
Definition at line 37 of file TFDTransport.h.
| Enumerator | |
|---|---|
| NO_CLOSE_ON_DESTROY | |
| CLOSE_ON_DESTROY | |
Definition at line 39 of file TFDTransport.h.
|
inline |
Definition at line 44 of file TFDTransport.h.
|
inline |
|
virtual |
Closes the transport.
Reimplemented from contrail::sandesh::transport::TTransport.
|
inline |
Definition at line 66 of file TFDTransport.h.
|
inlinevirtual |
Whether this transport is open.
Reimplemented from contrail::sandesh::transport::TTransport.
Definition at line 55 of file TFDTransport.h.
|
inlinevirtual |
Opens the transport for communications.
Reimplemented from contrail::sandesh::transport::TTransport.
Definition at line 57 of file TFDTransport.h.
| int32_t contrail::sandesh::transport::TFDTransport::read | ( | uint8_t * | buf, |
| uint32_t | len | ||
| ) |
|
inline |
Definition at line 65 of file TFDTransport.h.
| int32_t contrail::sandesh::transport::TFDTransport::write | ( | const uint8_t * | buf, |
| uint32_t | len | ||
| ) |
|
protected |
Definition at line 70 of file TFDTransport.h.
|
protected |
Definition at line 69 of file TFDTransport.h.