summaryrefslogtreecommitdiffstats
path: root/src/net_tcp.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-12 09:19:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-12 09:19:14 +0000
commitecc5838aff97659dd679f03edc8838205f868848 (patch)
tree85848124743d10e50adce2e36e3566b3d37b4ce7 /src/net_tcp.c
parentAdding upstream version 2.6.0. (diff)
downloaddnsperf-ecc5838aff97659dd679f03edc8838205f868848.tar.xz
dnsperf-ecc5838aff97659dd679f03edc8838205f868848.zip
Adding upstream version 2.7.0.upstream/2.7.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/net_tcp.c')
-rw-r--r--src/net_tcp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/net_tcp.c b/src/net_tcp.c
index c04f25d..97d1f65 100644
--- a/src/net_tcp.c
+++ b/src/net_tcp.c
@@ -367,7 +367,7 @@ static bool perf__tcp_have_more(struct perf_net_socket* sock)
return self->have_more;
}
-struct perf_net_socket* perf_net_tcp_opensocket(const perf_sockaddr_t* server, const perf_sockaddr_t* local, size_t bufsize)
+struct perf_net_socket* perf_net_tcp_opensocket(const perf_sockaddr_t* server, const perf_sockaddr_t* local, size_t bufsize, void* data, perf_net_sent_cb_t sent, perf_net_event_cb_t event)
{
struct perf__tcp_socket* tmp = calloc(1, sizeof(struct perf__tcp_socket)); // clang scan-build
struct perf_net_socket* sock = (struct perf_net_socket*)tmp;
@@ -384,6 +384,10 @@ struct perf_net_socket* perf_net_tcp_opensocket(const perf_sockaddr_t* server, c
sock->sockready = perf__tcp_sockready;
sock->have_more = perf__tcp_have_more;
+ sock->data = data;
+ sock->sent = sent;
+ sock->event = event;
+
self->server = *server;
self->local = *local;
self->bufsize = bufsize;