Skip to content

Commit

Permalink
Merge pull request #374 from gbaligh/remove_setsockopt_tcp_nodelay
Browse files Browse the repository at this point in the history
setsockopt failed after last commit #368
  • Loading branch information
jobezic authored Jun 28, 2017
2 parents b9f477b + a858eda commit 19b20e3
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1260,19 +1260,6 @@ int net_open_eth(net_interface *netif) {
ndelay_on(netif->fd);
coe(netif->fd);

/* Try to set TCP_NODELAY for stream socket type */
{
int type;
unsigned int typelen = sizeof(type);

if ((getsockopt(netif->fd, SOL_SOCKET, SO_TYPE, &type, &typelen) == 0) &&
(type == SOCK_STREAM)) {
option = 1;
if (net_setsockopt(netif->fd, IPPROTO_TCP, TCP_NODELAY, &option, sizeof(option)) < 0)
return -1;
}
}

/* Enable reception and transmission of broadcast frames */
option = 1;
if (net_setsockopt(netif->fd, SOL_SOCKET, SO_BROADCAST,
Expand Down

0 comments on commit 19b20e3

Please sign in to comment.