Sender class
unsigned long | Sender::ConvertToNumericIP (char *addr) Converts string address into the unsigned long |
Err | Sender::DispatchMsg (GMessage *msg) Send a message over the network |
void | Sender::DispatcherThread (GMessage *msg) Connect to one of the recipients and send him the message |
GMessage* | Sender::MakeMessageForSendingToMix (GMessage *chunk) Add recipient to message |
void* | Sender::Run (void *) Generic Sender Run() method |
Sender::Sender (LogFile * senderLogFile, Killer * killer, MessageQueue * toSenderQueue, string origin, string IP = "", unsigned short port = 0) Generic sender constructor | |
void | Sender::Shutdown () Prepare for clean shutdown |
Err | Sender::WriteMsgToSocket (int sock, GMessage *msg) Write message to connected socket |
Sender::~Sender () Generic Sender destructor |
methods
|
attributes
| |||||||||
methods
|
Sender class. Sends messages across network to other Mix or Six Expects a GMessage containing:GM_RECIPIENT_1 GM_RECIPIENT_2 GM_CHUNK GM_DEBUG GM_PROTOCOL_VERSION GM_REST_OF_PATH GM_DATAMakes a message like this and transmits it over network to IP from field Recipient.GM_CHUNK GM_RECIPIENT GM_DEBUG PROTOCOL_VERSION GM_REST_OF_PATH GM_DATAThe GM_RECIPIENT is set to GM_RECIPIENT_1 or GM_RECIPIENT_2 depending on which was used as destination address.
GM_RECIPIENT
GM_DDADDRESS
GM_PORT
GM_CHUNK
GM_RECIPIENT_1
GM_ADDRESS
GM_PORT
[GM_RECIPIENT_2
GM_ADDRESS
GM_PORT ]
GM_CHUNK
The chosen recipient is inserted into the GM_CHUNK and that is
transmitted over network.
GM_RECIPIENT
GM_DDADDRESS
GM_PORT
GM_CHUNK
killer - Who will notify us about shutdown.
origin - What will we insert as GM_ORIGIN into
outgoing messages.
IP - Where to send messages by default
(used when sending from Six to underlying Mix).
port - Port number to which to connect.
msg - GMessage to send.
alphabetic index hierarchy of classes
generated by doc++