#include <fd-net-device.h>
Public Member Functions | |
FdNetDeviceFdReader () | |
Constructor for the FdNetDevice. More... | |
void | SetBufferSize (uint32_t bufferSize) |
Set size of the read buffer. More... | |
Public Member Functions inherited from ns3::FdReader | |
FdReader () | |
virtual | ~FdReader () |
void | Start (int fd, Callback< void, uint8_t *, ssize_t > readCallback) |
Start a new read thread. More... | |
void | Stop (void) |
Stop the read thread and reset internal state. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< FdReader > | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Private Member Functions | |
FdReader::Data | DoRead (void) |
The read implementation. More... | |
Private Attributes | |
uint32_t | m_bufferSize |
Additional Inherited Members | |
Static Public Member Functions inherited from ns3::SimpleRefCount< FdReader > | |
static void | Cleanup (void) |
Noop. More... | |
Protected Attributes inherited from ns3::FdReader | |
int | m_fd |
The file descriptor to read from. More... | |
Definition at line 43 of file fd-net-device.h.
ns3::FdNetDeviceFdReader::FdNetDeviceFdReader | ( | ) |
Constructor for the FdNetDevice.
Definition at line 47 of file fd-net-device.cc.
|
privatevirtual |
The read implementation.
m_len
returned controls further processing. The callback function is only invoked when m_len
is positive; any data read is not processed when m_len
is negative; reading stops when m_len
is zero.The management of memory associated with m_buf
must be compatible with the read callback.
Implements ns3::FdReader.
Definition at line 58 of file fd-net-device.cc.
References m_bufferSize, ns3::FdReader::m_fd, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
void ns3::FdNetDeviceFdReader::SetBufferSize | ( | uint32_t | bufferSize | ) |
Set size of the read buffer.
Definition at line 53 of file fd-net-device.cc.
References m_bufferSize.
|
private |
Definition at line 60 of file fd-net-device.h.
Referenced by DoRead(), and SetBufferSize().