DtSmSocket provides access to shared memory via a subscribable message queue.
More...
|
| | DtSmSocket__rti__ (const char *sharename, std::shared_ptr< DtMsgHeaderReader > hdrReader) |
| |
| virtual | ~DtSmSocket__rti__ () |
| |
| virtual bool | initializeSmQueue (DtU32 id=DtSM_INVALID_SUBSCRIBER_ID, bool forceSubscribe=false) |
| | Attach to shared memory message queue. More...
|
| |
| virtual bool | initializeSmQueue (DtU32 numBuckets, DtU32 payloadSize, DtU32 id=DtSM_INVALID_SUBSCRIBER_ID, bool forceSubscribe=false) |
| | The following version of initializeSmQueue() is specific to management of the shared memory subscribable message queue which the socket interfaces with. More...
|
| |
| virtual int | sendMessage (caddr_t msg, size_t msgSize, bool deleteAfterSend, const DtInetAddr ¬Used=DtInetAddr::inaddrAny()) |
| | The send method sendMessage() ignores the destination address and does not promulgate any transport method. More...
|
| |
| virtual bool | flush () |
| | Send buffered messages. More...
|
| |
| virtual void | openSocket (const DtInetEndpoint &dest, DtU32 flags=DtDefaultSockOpts, DtU16 localPort=0, DtInetDevice *hostIf=NULL) |
| | These methods do nothing but must be overridden to prevent parent class from attempting to perform setsockopt on non-existent socket. More...
|
| |
| virtual void | enableBundling (size_t maxBundleSize) |
| | Enables message bundling and sets the maximum bundle size. More...
|
| |
| virtual void | disableBundling () |
| | Disables message bundling. More...
|
| |
| virtual void | enableCompression (DtU8 compressionLevel) |
| |
| virtual void | disableCompression () |
| | Disables message compression. More...
|
| |
| virtual bool | joinMulticastGroup (const DtInetAddr &grpAddr, DtInetDevice *device=NULL) |
| |
| virtual bool | joinMulticastGroup (const DtInetEndpoint &grpEndpoint, DtInetDevice *device=NULL) |
| |
| virtual bool | dropMulticastGroup (const DtInetAddr &grpAddr, DtInetDevice *device=NULL) |
| |
| virtual bool | dropMulticastGroup (const DtInetEndpoint &grpEndpoint, DtInetDevice *device=NULL) |
| |
| virtual bool | setMcastTtlOption (DtU32 ttl) |
| |
| virtual void | setRetryOnSend (unsigned int numRetries, double waitPeriod) |
| | Enables/disables send retries on failure. More...
|
| |
virtual
DtSmSubscribableMessageQueue__rti__ * | msgQueue () const |
| |
| virtual bool | isOpen () const |
| | Returns true if the socket is open. More...
|
| |
| virtual int | subscribe (DtU32 id=DtSM_INVALID_SUBSCRIBER_ID) |
| | The following methods are for use by all subscribers the the shared memory subscribable message queue the socket interfaces with. More...
|
| |
| virtual void | unsubscribe (DtU32 id) |
| |
| virtual bool | shutdownQueue (bool ruthless=false) |
| | The following methods are specific to management of the shared memory subscribable message queue which the socket interfaces with. More...
|
| |
| virtual int | subscriberCount () const |
| |
| | DtUdpMsgSocket (std::shared_ptr< DtMsgHeaderReader > hdrReader, size_t maxPacketSize=DtDefaultMaxPacketSize) |
| | Constructor. More...
|
| |
| virtual | ~DtUdpMsgSocket () |
| | Destructor. More...
|
| |
| virtual void | openSocket (const MAKRti::DtInetEndpoint &dest, MAKRti::DtU32 flags=theDefaultSockOpts, MAKRti::DtU16 localPort=0, MAKRti::DtInetDevice *hostIf=NULL) |
| | Opens the socket if not already open. More...
|
| |
| virtual int | sendMessage (caddr_t msg, size_t msgSize, bool deleteAfterSend, const MAKRti::DtInetAddr &destAddr=MAKRti::DtInetAddr::inaddrAny(), int port=0) |
| | Sends a message. More...
|
| |
| virtual int | recvMessage (caddr_t *buffptr) |
| | Gets the next message from the incoming data. More...
|
| |
| virtual int | recvMessageWithSrc (caddr_t *buffptr, MAKRti::DtInetEndpoint &src) |
| | Gets the next message from the incoming data. More...
|
| |
| virtual void | enableCompression (MAKRti::DtU8 compressionLevel) |
| | Enables message compression and sets the compression level. More...
|
| |
| virtual bool | joinMulticastGroup (const MAKRti::DtInetAddr &grpAddr, MAKRti::DtInetDevice *device=NULL) |
| | Join / drop subscription to multicast group. More...
|
| |
| virtual bool | joinMulticastGroup (const MAKRti::DtInetEndpoint &grpEndpoint, MAKRti::DtInetDevice *device=NULL) |
| |
| virtual bool | dropMulticastGroup (const MAKRti::DtInetAddr &grpAddr, MAKRti::DtInetDevice *device=NULL) |
| |
| virtual bool | dropMulticastGroup (const MAKRti::DtInetEndpoint &grpEndpoint, MAKRti::DtInetDevice *device=NULL) |
| |
| virtual bool | setMcastTtlOption (MAKRti::DtU32 ttl) |
| | Change the default time-to-live on outbound multicast packets sent from this socket. More...
|
| |
| virtual MAKRti::DtU32 | maxMsgSize () const |
| | Gets the maximum message size. More...
|
| |
| MAKRti::DtInetUdpSocket * | inetUdpSocket () |
| | Returns a pointer to the MAKRti::DtInetUdpSocket. More...
|
| |
| virtual void | setFilterPort (int port) |
| | Sets the filter port. All messages sent from this port on this machine will be filtered. More...
|
| |
| | DtMsgSocket (std::shared_ptr< DtMsgHeaderReader > hdrReader, size_t recvBuffSize) |
| | Constructor. More...
|
| |
| | DtMsgSocket (DtUniquePtr< MAKRti::DtInetSocket > socket, std::shared_ptr< DtMsgHeaderReader > hdrReader, size_t recvBuffSize) |
| | Constructor which takes a pre-created MAKRti::DtInetSocket pointer. More...
|
| |
| virtual | ~DtMsgSocket () |
| | Destructor. More...
|
| |
| virtual bool | closeSocket () |
| | Close a socket. Returns true on successful close or false on failure. More...
|
| |
| virtual MAKRti::DtInetSockState | state () const |
| | Returns the state of the socket. More...
|
| |
| void | printStateToStream (MAKRti::DtOutputStream &stream) const |
| | prints state to stream More...
|
| |
| const MAKRti::DtString & | lastError () const |
| | Returns a description of the last error. More...
|
| |
| const MAKRti::DtInetEndpoint & | localEndpoint () const |
| | Gets the local endpoint for the socket. More...
|
| |
| void | setSendBufferSize (MAKRti::DtU32 size) |
| | Sets the socket send buffer size. More...
|
| |
| void | setRecvBufferSize (MAKRti::DtU32 size) |
| | Sets the socket receive buffer size. More...
|
| |
| MAKRti::DtU32 | maxSendMsgSize () const |
| | Gets the maximum socket send size. More...
|
| |
| unsigned int | descriptor () const |
| | Get's the socket file descriptor. More...
|
| |
| MAKRti::DtInetSocket * | inetSocket () |
| | Returns a pointer to the MAKRti::DtInetSocket. More...
|
| |
|
| virtual int | recv (caddr_t *buffptr, DtInetEndpoint *ep) |
| | Gets the next message from the incoming data. More...
|
| |
| | DtSmSocket__rti__ (const DtSmSocket__rti__ &) |
| | Not Implemented. More...
|
| |
| DtSmSocket__rti__ & | operator= (const DtSmSocket__rti__ &) |
| | Not Implemented. More...
|
| |
| virtual int | sendPacket (caddr_t msg, size_t msgSize, const MAKRti::DtInetAddr &destAddr=MAKRti::DtInetAddr::inaddrAny(), int port=0) |
| | Sends a single packet; handle retries if necessary. More...
|
| |
| virtual int | doSendPacket (caddr_t msg, size_t msgSize, const MAKRti::DtInetAddr &destAddr=MAKRti::DtInetAddr::inaddrAny(), int port=0) |
| | Just do the send packet part dealing with destination and port. More...
|
| |
| virtual int | retrySendTo (caddr_t msg, size_t msgSize, const MAKRti::DtInetAddr &destAddr=MAKRti::DtInetAddr::inaddrAny(), int port=0) |
| | Retry sending a message which failed to send. More...
|
| |
| virtual int | recv (caddr_t *buffptr, MAKRti::DtInetEndpoint *ep) |
| | Gets the next message from the incoming data. More...
|
| |
| void | expandRecvBuffer (size_t sizeNeeded) |
| | Expands the receive buffer to accommodate the given size message. More...
|
| |
DtSmSocket provides access to shared memory via a subscribable message queue.
DtSmSocket isn't really a socket in the classical 'BSD sockets' sense. It is an interface abstraction that mirrors socket functionality to allow applications to easily use either network I/O or shared memory for communication using the same general interface. Where this flexibility is not a paramount concern direct access to the subscribable message queue is more efficient.