Changeset 387 in flair-src for trunk/lib/FlairCore/src/UdpSocket_impl.cpp


Ignore:
Timestamp:
Dec 21, 2020, 2:49:53 PM (4 years ago)
Author:
Sanahuja Guillaume
Message:

resolve bug with udp broadcast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/UdpSocket_impl.cpp

    r364 r387  
    192192}
    193193
    194 void UdpSocket_impl::SendMessage(string message) {
     194void UdpSocket_impl::SendMessage(string message,int dst_id) {
    195195  ssize_t written;
    196196
     
    208208  }
    209209#else
    210   written = sendto(fd, message.c_str(), message.size(), 0, (struct sockaddr *)&sock_in, sizeof(struct sockaddr_in));
     210  written = sendto(fd, message.c_str(), message.size(), 0,(struct sockaddr *)&(sock_in[dst_id]), sizeof(struct sockaddr_in));
    211211  if (written != (ssize_t)message.size()) {
    212     self->Err("sendto error\n");
     212    self->Err("sendto error %i/%i\n",written,(ssize_t)message.size());
    213213  }
    214214
Note: See TracChangeset for help on using the changeset viewer.