aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/ipa-stream-client.c10
-rw-r--r--examples/ipa-stream-server.c10
2 files changed, 2 insertions, 18 deletions
diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c
index ec7d2b3..0c9c589 100644
--- a/examples/ipa-stream-client.c
+++ b/examples/ipa-stream-client.c
@@ -186,21 +186,13 @@ int main(int argc, char *argv[])
osmo_stream_cli_set_disconnect_cb(conn, disconnect_cb);
osmo_stream_cli_set_read_cb(conn, read_cb);
osmo_stream_cli_set_data(conn, &num_msgs);
+ osmo_stream_cli_set_nodelay(conn, true);
if (osmo_stream_cli_open(conn) < 0) {
fprintf(stderr, "cannot open client\n");
exit(EXIT_FAILURE);
}
- int on = 1, ret;
- struct osmo_fd *ofd = osmo_stream_cli_get_ofd(conn);
-
- ret = setsockopt(ofd->fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on));
- if (ret < 0) {
- LOGP(DIPATEST, LOGL_ERROR, "cannot disable Nagle\n");
- exit(EXIT_FAILURE);
- }
-
LOGP(DIPATEST, LOGL_NOTICE, "Entering main loop\n");
while(1) {
diff --git a/examples/ipa-stream-server.c b/examples/ipa-stream-server.c
index e774b31..c311697 100644
--- a/examples/ipa-stream-server.c
+++ b/examples/ipa-stream-server.c
@@ -117,21 +117,13 @@ int main(void)
osmo_stream_srv_link_set_addr(srv, "127.0.0.1");
osmo_stream_srv_link_set_port(srv, 10000);
osmo_stream_srv_link_set_accept_cb(srv, accept_cb);
-
- int on = 1, ret;
- struct osmo_fd *ofd = osmo_stream_srv_link_get_ofd(srv);
+ osmo_stream_srv_link_set_nodelay(srv, true);
if (osmo_stream_srv_link_open(srv) < 0) {
fprintf(stderr, "cannot open client\n");
exit(EXIT_FAILURE);
}
- ret = setsockopt(ofd->fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on));
- if (ret < 0) {
- LOGP(DSTREAMTEST, LOGL_ERROR, "cannot disable Nagle\n");
- exit(EXIT_FAILURE);
- }
-
LOGP(DSTREAMTEST, LOGL_NOTICE, "Entering main loop\n");
while(1) {