Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Aug 2002 12:45:56 -0700
From:      "Balaji, Pavan" <pavan.balaji@intel.com>
To:        "'Gianmarco Giovannelli'" <gmarco@giovannelli.it>, questions@FreeBSD.ORG
Subject:   RE: Porting from win32 to UNIX: Sockets
Message-ID:  <3D386AED1B47D411A94300508B11F18704AD69C0@fmsmsx116.fm.intel.com>

next in thread | raw e-mail | index | archive | help

The error code for "wouldblock" is EWOULDBLOCK and that of "connreset" is
ECONNRESET.

See /usr/include/sys/errno.h for all the error codes.


Pavan Balaji,
Intel Corporation
Email: pavan.balaji@intel.com

    "Only the Paranoid Survive"  --  Andy Grove


> -----Original Message-----
> From: Gianmarco Giovannelli [mailto:gmarco@giovannelli.it]
> Sent: Wednesday, August 21, 2002 1:44 PM
> To: questions@FreeBSD.ORG
> Subject: Porting from win32 to UNIX: Sockets
> 
> 
> Hi a friend of mine involved in a porting project.
> He has asking me something about socket and more I am not 
> able to answer  :-)
> 
> Thanks for your attention...
> 
> --- begin ---
> 
> [...]
> that are familiar with "low-level-TCP/IP" coding.
> plz help
> 
> following problem:
> I don't know how to get an errorcode in case of 
> socket-operation failed 
> (send/recv)
> in windows it goes like this
> 
> e.g
> res = send(....);
> if (res==SOCKET_ERROR)
> {
> err = WSAGetLastError();
> if (err==....) ...;
> }
> 
> but how to do this in linux/UNIX/BSD ?
> what's the equivalent of WSAGetLastError ?
> 
> furthermore I need to know the errorcodes of
> "wouldblock" and "connreset"
> 
> 
> --- end ---
> 
> Best Regards,
> Gianmarco Giovannelli ,  "Unix expert since yesterday"
> http://www.gufi.org/~gmarco
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D386AED1B47D411A94300508B11F18704AD69C0>