Re: accept() source code
- From: Maxim Yegorushkin <maxim.yegorushkin@xxxxxxxxx>
- Date: Tue, 12 Jun 2007 13:52:35 -0700
On 12 Jun, 15:52, Thiyaga <m.thiy...@xxxxxxxxx> wrote:
It would be great, if any body could point me to accept() (solaris
version) of source code.
I am facing frequent accept() failures, which I've already posted in
this group.
One programming error with accept() is forgetting to initialize the
third argument if it is not NULL.
sockaddr_in peer;
socklen_t peer_len = sizeof peer; // <--- must be initialized
int client = accept(sock, (sockaddr*)&peer, &peer_len);
.
- Follow-Ups:
- Re: accept() source code
- From: sjdevnull@xxxxxxxxx
- Re: accept() source code
- References:
- accept() source code
- From: Thiyaga
- accept() source code
- Prev by Date: Re: Belady Anomaly, and algorithms
- Next by Date: Re: How to detect whether the network interface is up or not.
- Previous by thread: accept() source code
- Next by thread: Re: accept() source code
- Index(es):
Relevant Pages
|