Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 18 lines (15 sloc) 0.316 kb
3e25c70 import dnscache 1.00
D. J. Bernstein authored
1 #include <sys/types.h>
2 #include <sys/param.h>
3 #include <sys/socket.h>
4 #include <netinet/in.h>
df36440 import djbdns 1.03
D. J. Bernstein authored
5 #include <unistd.h>
3e25c70 import dnscache 1.00
D. J. Bernstein authored
6 #include "ndelay.h"
7 #include "socket.h"
8
9 int socket_tcp(void)
10 {
11 int s;
12
13 s = socket(AF_INET,SOCK_STREAM,0);
14 if (s == -1) return -1;
15 if (ndelay_on(s) == -1) { close(s); return -1; }
16 return s;
17 }
Something went wrong with that request. Please try again.