This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

socket()


I have tried to recompile and run a simple socket server from Unix to my
PC with
b18-

however, my socket creation is not working...

the code is essentially following Curry's "Unix Systems Programming"
Example

<sys/types>
<sys/socket>
<netinet/in.h>
:
:

if ((s=socket(AF_INET, SOCK_STREAM, 0))< 0)
{
    perror("socket");
    exit(1);
}

and here is where my code exits every time with a negative descriptor
for the socket??
I am assuming that to compile,  all I need is gcc -o svr svr.c
and that the cygwin.dll will act as libnsl and libsocket for me...

has anyone else encountered this? Am I missing something very simple?

Thanks

davej



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]