| 540 | |
| 541 | |
| 542 | void PeerInterface::sendMessage(const struct sockaddr_in* peer, const char *message) |
| 543 | { |
| 544 | LOG(DEBUG) << "sending message: " << message; |
| 545 | const char *eol = strchr(message,'\n'); |
| 546 | if (!strstr(message,"REQ NEI")) { |
| 547 | WATCH(Utils::timestr() << " Peering send:"<<string(message,eol?eol-message:strlen(message))); // first line of message. |
| 548 | } |
| 549 | ScopedLock lock(mLock); |
| 550 | mSocket.send((const struct sockaddr*)peer,message); |
| 551 | } |
| 552 | |
| 553 | // (pat) The FIFO is specific to the transaction id, which is why there cant be any other acks in there. |
| 554 | // We may leave a whole bunch of acks in the fifo but the fifo is used solely for this single message |