~ubuntu-branches/ubuntu/oneiric/ocsigen/oneiric

« back to all changes in this revision

Viewing changes to server/nagle.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephane Glondu
  • Date: 2009-07-02 10:02:08 UTC
  • mfrom: (1.1.9 upstream) (4.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090702100208-n158b1sqwzn0asil
Tags: 1.2.0-2
Fix build on non-native architectures

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <caml/mlvalues.h>
2
 
#include <sys/types.h>
3
 
#include <sys/socket.h>
4
 
#include <netinet/in.h>
5
 
#include <netinet/tcp.h>
6
 
 
7
 
 
8
 
CAMLprim value disable_nagle(value fd)
9
 
{
10
 
 
11
 
  int i = 1;
12
 
 
13
 
  setsockopt(Int_val(fd), IPPROTO_TCP, TCP_NODELAY,
14
 
             &i, sizeof(int));
15
 
 
16
 
  return Val_int(0);
17
 
 
18
 
}
19