Public Member Functions |
| | DtSocketPairSocket () |
| | DtSocketPairSocket (int sockNum) |
| int | sendTo (caddr_t packet, size_t size, DtIpv4Addr addr) |
| | sendTo is a pure virtual function which subclasses should impliment to take packets and place them on a network interface.
|
| int | recvWithStatus (caddr_t buffptr, size_t size, int *status=NULL) |
| int | DtRecv (caddr_t *buffptr, int *status) |
| | DtReceiv is he function which VR-Link uses to read packets from the socket.
|
| int | DtRecv (caddr_t buff, size_t size) |
| void | DtBecomeNonBlocking (void) |
| int | otherFd () |
| int | readFd () |
| | Get the file descriptor for reading and writing to this socket.
|
| int | writeFd () |
| | DtSocket () |
| | Default constructor.
|
| virtual | ~DtSocket () |
| | Default Destructor.
|
| virtual int | DtSend (caddr_t packet, size_t size, DtIpv4Addr addr=DtUSE_DEFAULT_IP_ADDR) |
| | DtSend is called when someone wants to send a packet to this "Socket", in other words, all outgoing messages are passed to this socket via DtSend().
|
| caddr_t | DtRecv () |
| virtual DtFlushStatus | flush () |
| | Send buffered messages.
|
| virtual DtFlushStatus | flush (long &byteCount) |
| | Send buffered messages.
|
| virtual void | setReceiveBufferSize (int newsize) |
| | Change the socket's receive buffer size that the OS uses to collect incoming data from the network.
|
| virtual void | setSendBufferSize (int newsize) |
| | Change the socket's send buffer size that the OS uses when writing data to the network.
|
| virtual void | setBundling (int maxSize) |
| virtual int | isBundling () |
| virtual void | setUnbundling (int) |
| virtual DtIpv4Addr | lastSourceInetAddr () |
| virtual int | DtReportPktsRcvd (void) |
| virtual void | notifyMe () |
| virtual int | listenToMulticastGroup (DtIpv4Addr addr, DtIpv4Addr netInterface=DtUSE_DEFAULT_IP_ADDR) |
| virtual int | dropMulticastGroup (DtIpv4Addr addr, DtIpv4Addr netInterface=DtUSE_DEFAULT_IP_ADDR) |
| virtual int | setMcastTtl (int) |
| virtual void | setMcastDevice (DtIpv4Addr) |
| virtual DtFilterTest * | exerciseId () |
| virtual DtFilterTest * | protocolVersion () |
| virtual DtFilterTest * | pduKind () |
| virtual DtFilterTest * | ipAddr () |
| virtual bool | isOk () const |
Constructor & Destructor Documentation
| DtSocketPairSocket::DtSocketPairSocket |
( |
| ) |
|
| DtSocketPairSocket::DtSocketPairSocket |
( |
int |
sockNum | ) |
|
Member Function Documentation
| void DtSocketPairSocket::DtBecomeNonBlocking |
( |
void |
| ) |
|
|
virtual |
| int DtSocketPairSocket::DtRecv |
( |
caddr_t * |
buffptr, |
|
|
int * |
status |
|
) |
| |
|
virtual |
DtReceiv is he function which VR-Link uses to read packets from the socket.
Users who wish to provide another mechanisim, such as shared memory, or loopback, will need to impliment or override these functions to return new packets. Depending on the implementation in derived DtSockets, one of the forms of DtRecv may be faster than the other.
DtRecv has an optional status argument that could more elegantly be implemented as different return codes, but this would break older code.
- Note
- If a derived class complains "... hides virtual DtRecv() ...", make sure you have BOTH overloads of DtRecv declared and defined in the subclass.
Implements DtSocket.
| int DtSocketPairSocket::DtRecv |
( |
caddr_t |
buff, |
|
|
size_t |
|
|
) |
| |
|
virtual |
| int DtSocketPairSocket::otherFd |
( |
| ) |
|
|
inline |
| int DtSocketPairSocket::readFd |
( |
| ) |
|
|
inlinevirtual |
Get the file descriptor for reading and writing to this socket.
NOTE: Not all DtSocket have associated file descriptors. Those that do not will have readFd()/writeFd() return -1.
Reimplemented from DtSocket.
| int DtSocketPairSocket::recvWithStatus |
( |
caddr_t |
buffptr, |
|
|
size_t |
size, |
|
|
int * |
status = NULL |
|
) |
| |
| int DtSocketPairSocket::sendTo |
( |
caddr_t |
packet, |
|
|
size_t |
size, |
|
|
DtIpv4Addr |
addr |
|
) |
| |
|
virtual |
sendTo is a pure virtual function which subclasses should impliment to take packets and place them on a network interface.
This function is called by DtSend which deals with bundling.
Implements DtSocket.
| int DtSocketPairSocket::writeFd |
( |
| ) |
|
|
inlinevirtual |
Member Data Documentation
| char DtSocketPairSocket::buffer[1500] |
|
private |
| int DtSocketPairSocket::myFd |
|
private |
| int DtSocketPairSocket::ofd |
|
private |
The documentation for this class was generated from the following file: