2006-05-18 06:02:43 +00:00
|
|
|
#include <unistd.h>
|
2001-02-02 17:54:47 +00:00
|
|
|
#include "socket.h"
|
2006-05-18 06:02:43 +00:00
|
|
|
#include "ndelay.h"
|
2001-02-02 17:54:47 +00:00
|
|
|
|
|
|
|
int socket_tcp4(void) {
|
2006-06-23 03:53:16 +00:00
|
|
|
int s=socket_tcp4b();
|
2008-09-10 09:51:26 +00:00
|
|
|
if (s==-1) return -1;
|
2006-05-18 06:02:43 +00:00
|
|
|
if (ndelay_on(s) == -1) { close(s); return -1; }
|
|
|
|
return s;
|
2001-02-02 17:54:47 +00:00
|
|
|
}
|