[ECOS] network problems

Roland Caßebohm roland.cassebohm@visionsystems.de
Thu Apr 10 10:50:00 GMT 2003


On Donnerstag, 10. April 2003 10:41, Nick Garnett wrote:
> "Larry Harmon" <harmon@hrdcorp.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.

int one=1;
ioctl(fd, FIONBIO, &one);

Another question, does anybody know if there is an ioctl() or similar for 
checking if a TCP connaction is still alive?

Thanks,
Roland



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list