From 0a7d803b9aa40512cf0f0c574d397ccba3ff1d13 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 9 Mar 2011 23:09:26 +0100 Subject: Get UDP working. For UDP, activate retransmit timer before receiving rather than sending makes the event loop break nicely after sending a message (which is important for blocking mode). Not quite sure that this is really accurate wrt to retransmission timing though but it should do for now. For UDP, set the user_data member for the read callback in rs_conn_receive_packet -- the one from udp_init() doesn't do much good now. For UDP, implement receiving message. Add compat_recv(). --- lib/compat.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/compat.c') diff --git a/lib/compat.c b/lib/compat.c index fa075a1..ccc6388 100644 --- a/lib/compat.c +++ b/lib/compat.c @@ -14,3 +14,9 @@ compat_send (int sockfd, const void *buf, size_t len, int flags) { return send (sockfd, buf, len, flags); } + +ssize_t +compat_recv (int sockfd, void *buf, size_t len, int flags) +{ + return recv (sockfd, buf, len, flags); +} -- cgit v1.2.3