From owner-freebsd-questions Fri Apr 30 12:13:37 1999 Delivered-To: freebsd-questions@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (Postfix) with ESMTP id 20A5B150F3 for ; Fri, 30 Apr 1999 12:13:35 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.8.8/8.8.8) with ESMTP id MAA05020; Fri, 30 Apr 1999 12:12:15 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Date: Fri, 30 Apr 1999 12:12:14 -0700 (PDT) From: Doug White To: Greg Campbell Cc: freebsd-questions@FreeBSD.ORG Subject: Re: socket communication In-Reply-To: <000f01be9323$ce6e5bf0$9308a8c0@matrikon.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 30 Apr 1999, Greg Campbell wrote: > I would appreciate some words of wisdom from anyone > who has done some socket programming on FreeBSD. > > The question is this: > Is there anything special about connecting to a > socket from FreeBSD? I am getting an error from > the "connect" function call (nothing more than > -1 is returned which doesn't seem to map to any > error messages codes. > Read your man pages; the error is returned in the global variable errno. Use perror("connect"); to have the system error printed automatically instead of your custom oops() function. Doug White Internet: dwhite@resnet.uoregon.edu | FreeBSD: The Power to Serve http://gladstone.uoregon.edu/~dwhite | www.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message