Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Dec 2002 20:50:46 +0100
From:      dslb@tiscali.dk
To:        hackers@freebsd.org
Subject:   accept()
Message-ID:  <3D9FE7F600009214@cpfe5.be.tisc.dk>

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

When using accept() with:
int sd_client =3D accept(socket_descriptor, (sockaddr *)&client,
(socklen_t *) sizeof(client));

Accept return -1 and 14 in errno, but when I use:

socklen_t alen;
int sd_client =3D accept(socket_descriptor, (sockaddr *)&client, &alen);

It works fine. Why can't you use the first method? There must be a way
to avoid creating a variable just to hold the address?!?!?

br
socketd



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




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