#include "buffer.h"
#include "socket-client.h"
+#include <netinet/tcp.h>
+
# include <krb.h>
extern char *krb_realmofhost ();
if (s < 0)
error (1, 0, "cannot create socket: %s", SOCK_STRERROR (SOCK_ERRNO));
+#ifdef TCP_NODELAY
+ /* Avoid latency due to Nagle algorithm. */
+ {
+ int on = 1;
+
+ if (setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, &on, sizeof on) < 0)
+ error (0, errno, "warning: cannot set TCP_NODELAY on socket");
+ }
+#endif
+
port = get_cvs_port_number (root);
hp = init_sockaddr (&sin, root->hostname, port);