diff --git a/Makefile b/Makefile index 297cd12..c8c373b 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,7 @@ rinreport: rinreport.o rinex.o githash.o navmon.o ext/fmt-6.1.2/src/format.o ep $(CXX) -std=gnu++17 $^ -o $@ -lz -pthread rtcmtool: rtcmtool.o navmon.pb.o githash.o ext/fmt-6.1.2/src/format.o bits.o nmmsender.o $(SIMPLESOCKETS) navmon.o rtcm.o zstdwrap.o - $(CXX) -std=gnu++17 $^ -o $@ -lz -pthread -lprotobuf -lzstd + $(CXX) -std=gnu++17 $^ -o $@ -L/usr/local/lib -lz -pthread -lprotobuf -lzstd ubxtool: navmon.pb.o ubxtool.o ubx.o bits.o ext/fmt-6.1.2/src/format.o galileo.o gps.o beidou.o navmon.o ephemeris.o $(SIMPLESOCKETS) osen.o githash.o nmmsender.o zstdwrap.o diff --git a/nmmsender.cc b/nmmsender.cc index 5334b21..0d3ea3e 100644 --- a/nmmsender.cc +++ b/nmmsender.cc @@ -38,6 +38,12 @@ void NMMSender::sendTCPThread(Destination* d) SocketCommunicator sc(s); sc.setTimeout(3); sc.connect(addr); + +#if !defined(TCP_CORK) && defined(TCP_NOPUSH) + /* start off "buffering" */ + SSetsockopt(s, IPPROTO_TCP, TCP_NOPUSH, 1 ); +#endif + time_t connStartTime = time(0); if (d_debug) { cerr<dst<<" on "<