OpenSDN source code
|
#include <TSimpleFileTransport.h>
Public Member Functions | |
TSimpleFileTransport (const std::string &path, bool read=true, bool write=false) | |
![]() | |
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 () |
![]() | |
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) |
![]() | |
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) |
![]() | |
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) |
Additional Inherited Members | |
![]() | |
enum | ClosePolicy { NO_CLOSE_ON_DESTROY = 0, CLOSE_ON_DESTROY = 1 } |
![]() | |
TVirtualTransport () | |
TVirtualTransport (Arg_ const &arg) | |
TVirtualTransport (Arg1_ const &a1, Arg2_ const &a2) | |
![]() | |
TTransportDefaults () | |
![]() | |
TTransport () | |
![]() | |
int | fd_ |
ClosePolicy | close_policy_ |
Dead-simple wrapper around a file.
Writeable files are opened with O_CREAT and O_APPEND
Definition at line 32 of file TSimpleFileTransport.h.
contrail::sandesh::transport::TSimpleFileTransport::TSimpleFileTransport | ( | const std::string & | path, |
bool | read = true , |
||
bool | write = false |
||
) |