summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
913b7a4)
NAS'ам убраны не используемые переменные
-class PacketSender : public std::unary_function<uint32_t, void> {
+class PacketSender : public std::unary_function<uint32_t, int> {
public:
PacketSender(int s, char * b, int l, uint16_t p)
: sock(s),
buffer(b),
length(l),
port(p) {};
public:
PacketSender(int s, char * b, int l, uint16_t p)
: sock(s),
buffer(b),
length(l),
port(p) {};
- void operator() (uint32_t ip)
+ int operator() (uint32_t ip)
struct sockaddr_in sendAddr;
sendAddr.sin_family = AF_INET;
sendAddr.sin_port = port;
sendAddr.sin_addr.s_addr = ip;
struct sockaddr_in sendAddr;
sendAddr.sin_family = AF_INET;
sendAddr.sin_port = port;
sendAddr.sin_addr.s_addr = ip;
- res = sendto(sock, buffer, length, 0, (struct sockaddr*)&sendAddr, sizeof(sendAddr));
+ return sendto(sock, buffer, length, 0, (struct sockaddr*)&sendAddr, sizeof(sendAddr));