From 74b73a980b91799843f8004edd90387ac482af46 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 2 Nov 2012 08:56:54 +0100 Subject: Keep track of corresonding peers in associated sockets --- src/fastd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/fastd.h') diff --git a/src/fastd.h b/src/fastd.h index ecc3eee..1395df8 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -141,6 +141,7 @@ struct _fastd_bind_address { struct _fastd_socket { int fd; const fastd_bind_address *addr; + const fastd_peer *peer; }; struct _fastd_config { @@ -268,7 +269,7 @@ void fastd_send(fastd_context *ctx, const fastd_socket *sock, const fastd_peer_a void fastd_send_handshake(fastd_context *ctx, const fastd_socket *sock, const fastd_peer_address *address, fastd_buffer buffer); void fastd_handle_receive(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer); -fastd_socket* fastd_socket_open(fastd_context *ctx, int af); +fastd_socket* fastd_socket_open(fastd_context *ctx, const fastd_peer *peer, int af); void fastd_resolve_peer(fastd_context *ctx, fastd_peer *peer); -- cgit v1.2.3