This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: network problems


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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]