|
| Dealer (int id=-1) |
|
virtual int | Connect (string endpoint) |
| Setup the connection with the router. More...
|
|
virtual int | Send (Msg **msg) |
| Send a message to connected socket(s), non-blocking. More...
|
|
virtual Msg * | Receive () |
| Receive a message from any connected socket. More...
|
|
virtual void * | InternalID () const |
|
|
int | id_ |
|
zsock_t * | dealer_ |
|
zpoller_t * | poller_ |
|
int | local_id_ |
|
virtual int singa::Dealer::Connect |
( |
string |
endpoint | ) |
|
|
virtual |
Setup the connection with the router.
- Parameters
-
endpoint | identifier of the router. For intra-process connection, the endpoint follows the format of ZeroMQ, i.e., starting with "inproc://"; in Singa, since each process has one router, hence we can fix the endpoint to be "inproc://router" for intra-process. For inter-process, the endpoint follows ZeroMQ's format, i.e., IP:port, where IP is the connected process. |
- Returns
- 1 connection sets up successfully; 0 otherwise
virtual void* singa::Dealer::InternalID |
( |
| ) |
const |
|
inlinevirtual |
- Returns
- Identifier of the implementation dependent socket. E.g., zsock_t* for ZeroMQ implementation and rank for MPI implementation.
Implements singa::Socket.
virtual Msg* singa::Dealer::Receive |
( |
| ) |
|
|
virtual |
Receive a message from any connected socket.
- Returns
- a message pointer if success; nullptr if failure
Implements singa::Socket.
virtual int singa::Dealer::Send |
( |
Msg ** |
msg | ) |
|
|
virtual |
Send a message to connected socket(s), non-blocking.
The message will be deallocated after sending, thus should not be used after calling Send();
- Parameters
-
- Returns
- 1 for success queuing the message for sending, 0 for failure
Implements singa::Socket.
The documentation for this class was generated from the following file:
- /home/wangwei/program/asf/incubator-singa/include/communication/socket.h