Skip to content

Commit

Permalink
* Added documentation for UDP Transport send/receive functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jredmondson committed Feb 20, 2019
1 parent 10760f6 commit 73953e0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/madara/transport/udp/UdpTransport.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,23 @@ class MADARA_EXPORT UdpTransport : public BasicASIOTransport
/// min data sent
knowledge::containers::Integer sent_data_min;

/**
* Receives a buffer from a remote host
* @param buf buffer to fill with data
* @param bytes_read number of bytes read
* @param remote remote endpoint that sent message
* @return 0 if success, 1 if socket busy, or 2 if unknown error
**/
long receive_buffer(
char* buf, size_t & bytes_read, udp::endpoint& remote);

/**
* Sends a buffer to a host endpoint
* @param buf buffer to send
* @param size number of bytes to send
* @param target remote endpoint to send to
* @return 0 if success, 1 if socket busy, or 2 if unknown error
**/
long send_buffer(const udp::endpoint& target,
const char* buf, size_t size);

Expand Down

0 comments on commit 73953e0

Please sign in to comment.