#include <dc_send.hpp>
Public Member Functions | |
| virtual void | send_data (procid_t target, unsigned char packet_type_mask, std::istream &istrm, size_t len=size_t(-1))=0 |
| virtual void | send_data (procid_t target, unsigned char packet_type_mask, char *data, size_t len)=0 |
| virtual size_t | bytes_sent ()=0 |
| virtual bool | channel_active (procid_t target) const =0 |
| virtual void | shutdown ()=0 |
Base class of the data sending class. This class forms the sending side of a "multiplexer" send_data() will be called with a packet mask as well as a character stream containing the contents of the packet. This class must then transmit the data out of the associated comms.
Definition at line 35 of file dc_send.hpp.
| virtual size_t graphlab::dc_impl::dc_send::bytes_sent | ( | ) | [pure virtual] |
Bytes sent must be incremented BEFORE the data is transmitted. Packets marked CONTROL_PACKET should not be counted
Implemented in graphlab::dc_impl::dc_buffered_stream_send, graphlab::dc_impl::dc_buffered_stream_send_expqueue, graphlab::dc_impl::dc_buffered_stream_send_expqueue2, graphlab::dc_impl::dc_buffered_stream_send_expqueue_z, and graphlab::dc_impl::dc_stream_send.
| virtual bool graphlab::dc_impl::dc_send::channel_active | ( | procid_t | target | ) | const [pure virtual] |
returns true if the channel to the target machine is truly open. The dc_comm_base specification allows for lazy channels which are not created until it is used. For such implementations, this function should return true if the channel has been created, and false otherwise. Non-lazy implementations should return true all the time. The invariant to ensure is that this function must return true for a target machine ID if a packet has been sent from this machine to the target before this call.
Implemented in graphlab::dc_impl::dc_buffered_stream_send, graphlab::dc_impl::dc_buffered_stream_send_expqueue, graphlab::dc_impl::dc_buffered_stream_send_expqueue2, graphlab::dc_impl::dc_buffered_stream_send_expqueue_z, and graphlab::dc_impl::dc_stream_send.
| virtual void graphlab::dc_impl::dc_send::send_data | ( | procid_t | target, | |
| unsigned char | packet_type_mask, | |||
| char * | data, | |||
| size_t | len | |||
| ) | [pure virtual] |
Another possible interface the controller can call with when there is data to send. The caller has responsibility for freeing the pointer when this call returns
Implemented in graphlab::dc_impl::dc_buffered_stream_send, graphlab::dc_impl::dc_buffered_stream_send_expqueue, graphlab::dc_impl::dc_buffered_stream_send_expqueue2, graphlab::dc_impl::dc_buffered_stream_send_expqueue_z, and graphlab::dc_impl::dc_stream_send.
| virtual void graphlab::dc_impl::dc_send::send_data | ( | procid_t | target, | |
| unsigned char | packet_type_mask, | |||
| std::istream & | istrm, | |||
| size_t | len = size_t(-1) | |||
| ) | [pure virtual] |
Called by the controller when there is data to send. if len is -1, the function has to compute the length by itself, or send the data from the stream directly. the strm is not copyable.
Implemented in graphlab::dc_impl::dc_buffered_stream_send, graphlab::dc_impl::dc_buffered_stream_send_expqueue, graphlab::dc_impl::dc_buffered_stream_send_expqueue2, graphlab::dc_impl::dc_buffered_stream_send_expqueue_z, and graphlab::dc_impl::dc_stream_send.
| virtual void graphlab::dc_impl::dc_send::shutdown | ( | ) | [pure virtual] |
Last call sent to any instance of dc_send. If the sender multithreads, the sending thread must shut down.
Implemented in graphlab::dc_impl::dc_buffered_stream_send, graphlab::dc_impl::dc_buffered_stream_send_expqueue, graphlab::dc_impl::dc_buffered_stream_send_expqueue2, graphlab::dc_impl::dc_buffered_stream_send_expqueue_z, and graphlab::dc_impl::dc_stream_send.
1.7.1