Added shutdown. EBADIOCTL in connect. Chaned some debug output.

This commit is contained in:
Philip Homburg
2005-07-29 10:13:52 +00:00
parent 62c08df482
commit a7487a5c3c
4 changed files with 67 additions and 3 deletions
+6
View File
@@ -1,5 +1,6 @@
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <sys/socket.h>
@@ -12,6 +13,10 @@ static int _udp_socket(int protocol);
int socket(int domain, int type, int protocol)
{
#if DEBUG
fprintf(stderr, "socket: domain %d, type %d, protocol %d\n",
domain, type, protocol);
#endif
if (domain != AF_INET)
{
#if DEBUG
@@ -52,6 +57,7 @@ static int _tcp_socket(int protocol)
static int _udp_socket(int protocol)
{
int fd;
if (protocol != 0)
{
#if DEBUG