This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: network problems
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Larry Harmon" <harmon at hrdcorp dot com>
- Cc: "eCos discussion" <ecos-discuss at sources dot redhat dot com>
- Date: 10 Apr 2003 09:41:07 +0100
- Subject: Re: [ECOS] network problems
- References: <004901c2feba$6d9ccd00$6601a8c0@goodyear>
"Larry Harmon" <harmon at hrdcorp dot com> writes:
> select(1, (fd_set *)&fd_read, (fd_set *)0, (fd_set *)0, (struct timeval
> *)NULL)
Here's your problem. That first argument is the upper bound of the
number of fds to test. It needs to be TCPComm.socket_active+1.
>
> Is there a good example for this type of service?
The httpd does the same thing. Look there.
> I am confused about the network documentation. The 2.0b reference doesn't
> document recvfrom!
You're right. All the recv* functions are missing. I have no idea why.
> I am also unable to set my socket to non-blocking IO. How is this done with
> eCos?
>
Either an ioctl() or a setsockopt() call should do it -- exactly which
I don't know offhand.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss