From: tangent@cyberport.com (Warren Young)
Subject: Re: Plain win32 programming with sockets how?
14 Jan 1999 10:23:08 -0800
Message-ID: <4.1.19990114030430.00a7dc90.cygnus.gnu-win32@mail.cyberport.com>
References: <002601be3edf$5db896c0$05ff79c3@joco.wxs.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: gnu-win32@cygnus.com

At 11:27 AM 1/13/99 +0100, you wrote:
>How can i get the below code working without the need of the Cygwin?

[snip]

>     nbytes = write (sock, message, strlen (message));  

Use the send() call here: same syntax, but with a fourth argument, which is
usually 0.

>         perror ("write");

No perror under Win32.  Roll your own.  Example 10 in my FAQ (see link in
my signature) has a function that works roughly like perror, except that it
prints into a buffer instead of stdout, and only works with Winsock errors,
not general Win32 errors.

>     close (sock);  

closesocket().

Given those changes, your code should compile under any sane Win32 compiler.

Good luck,

= Warren Young -- Maintainer of the Winsock Programmer's FAQ at:
= http://www.cyberport.com/~tangent/programming/winsock/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
