Skip to content

Commit

Permalink
using some larger buffers for I/O
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jun 21, 2011
1 parent c4f0de4 commit e380648
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/support/ios.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ typedef enum { bm_none, bm_line, bm_block, bm_mem } bufmode_t;
typedef enum { bst_none, bst_rd, bst_wr } bufstate_t;

#define IOS_INLSIZE 54
#define IOS_BUFSIZE 8191
#define IOS_BUFSIZE 131072

typedef struct {
bufmode_t bm;
Expand Down
8 changes: 4 additions & 4 deletions src/support/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ int mysocket(int domain, int type, int protocol)
int s = socket(domain, type, protocol);
if (s < 0)
return s;
val = 4096;
val = 131072;
setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char*)&val, sizeof(int));
val = 4096;
val = 131072;
setsockopt(s, SOL_SOCKET, SO_SNDBUF, (char*)&val, sizeof(int));
return s;
}
Expand All @@ -46,7 +46,7 @@ int open_tcp_port(short portno)
if (sockfd < 0)
return -1;
val = 1;
//setsockopt(sockfd, SOL_TCP, TCP_NODELAY, &val, sizeof(val));
//setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
bzero(&serv_addr, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
Expand All @@ -71,7 +71,7 @@ int open_any_tcp_port(short *portno)
if (sockfd < 0)
return -1;
val = 1;
//setsockopt(sockfd, SOL_TCP, TCP_NODELAY, &val, sizeof(val));
//setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
bzero(&serv_addr, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
Expand Down

0 comments on commit e380648

Please sign in to comment.