Changeset 363 in flair-src for trunk/lib/FlairCore/src/UdpSocket.h


Ignore:
Timestamp:
Sep 3, 2020, 8:54:16 AM (15 months ago)
Author:
Sanahuja Guillaume
Message:

allow mutliple connection on udp (only nrt for the moment)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/UdpSocket.h

    r178 r363  
    1414#define UDPSOCKET_H
    1515
    16 #include <unistd.h>
    17 #include <stdint.h>
    1816#include <Object.h>
    1917
     
    7674  * \param message message
    7775  * \param message_len message length
     76  * \param dst_id id of the dst if multiple connection (quick and dirty hack for sido, only works on NRT)
    7877  */
    79   void SendMessage(const char *message, size_t message_len);
     78  void SendMessage(const char *message, size_t message_len,int dst_id=0);
    8079
    8180  /*!
     
    8483  * Receive a message and wait up to timeout. \n
    8584  * If src and src_len are specified, the source of the message will be
    86   * copied in the src buffer. \n
     85  * copied in the src buffer. Source is the Flair name of sender\n
    8786  * Note that in case of a broadcast socket, own messages are filtered and
    8887  * are not received.
     
    9392  * \param src buffer to put source name
    9493  * \param src_len buffer length
     94  * \param src_id id of the src, to be used for sending if multiple connection (quick and dirty hack for sido, only works on NRT)
    9595  *
    9696  * \return size of the received message
    9797  */
    9898  ssize_t RecvMessage(char *buf, size_t buf_len, Time timeout, char *src = NULL,
    99                       size_t *src_len = NULL);
     99                      size_t *src_len = NULL,int *src_id=NULL);
    100100
    101101  void NetworkToHost(char *data, size_t dataSize);
Note: See TracChangeset for help on using the changeset viewer.