public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <cygwin@cygwin.com>
To: cygwin <cygwin@cygwin.com>
Subject: Re: gethostbyname & uname question, help!
Date: Fri, 29 Dec 2000 02:36:00 -0000	[thread overview]
Message-ID: <20001229113606.B4278@cygbert.vinschen.de> (raw)
In-Reply-To: <20001229110348.A4278@cygbert.vinschen.de>

On Fri, Dec 29, 2000 at 11:03:48AM +0100, Corinna Vinschen wrote:
> On Fri, Dec 29, 2000 at 05:21:00PM +0800, crazyyao wrote:
> > Which head file should I include, winsock.h or sys/socket.h?
> > What's the differenc between them?
> 
> Don't include the winsock headers by yourself when creating a
> Cygwin application.

I forgot the difference: winsock.h is the Windows specific
header. Windows uses an extra socket lib called Winsock which
is based on the BSD implementation with several incompatible
Windows additions.

Cygwin has it's own socket interface which tries to be
POSIX compatible. This implementation uses Winsock as it's
base.

You will get in trouble when mixing both. Cygwin has it's
own `socket' call for example which uses the Winsock `socket'
call. However, they are not interchangable. You can't call
the Winsock `recv' with a Cygwin socket descriptor and vice versa.

You will find more information in the online docs under
http://www.cygwin.com/docs.html

Hope, that helps,
Corinna

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

      reply	other threads:[~2000-12-29  2:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-29  1:19 crazyyao
2000-12-29  2:04 ` Corinna Vinschen
2000-12-29  2:36   ` Corinna Vinschen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001229113606.B4278@cygbert.vinschen.de \
    --to=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).