From owner-freebsd-questions Wed Aug 21 11:43:46 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 040B037B400 for ; Wed, 21 Aug 2002 11:43:44 -0700 (PDT) Received: from freebsd.giovannelli.com (freebsd.giovannelli.com [194.184.65.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F1C143E72 for ; Wed, 21 Aug 2002 11:43:42 -0700 (PDT) (envelope-from gmarco@giovannelli.it) Received: from usul.giovannelli.it (usul.giovannelli.com [10.254.254.4]) by freebsd.giovannelli.com (8.12.5/8.12.5) with ESMTP id g7LKhvYi001606 for ; Wed, 21 Aug 2002 20:43:58 GMT (envelope-from gmarco@giovannelli.it) Message-Id: <5.1.1.6.2.20020821204121.02ad7008@194.184.65.4> X-Sender: gmarco@194.184.65.4 X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Wed, 21 Aug 2002 20:44:27 +0200 To: questions@freebsd.org From: Gianmarco Giovannelli Subject: Porting from win32 to UNIX: Sockets Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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