This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: network problems
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Larry Harmon <harmon at hrdcorp dot com>
- Cc: eCos discussion <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 10 Apr 2003 09:17:05 +0200
- Subject: Re: [ECOS] network problems
- References: <004901c2feba$6d9ccd00$6601a8c0@goodyear>
> I then try the following:
> FD_ZERO(&fd_read);
> FD_SET(TCPComm.socket_active, &fd_read);
> select(1, (fd_set *)&fd_read, (fd_set *)0, (fd_set *)0, (struct timeval
> *)NULL)
> cmdSize = recvfrom(TCPComm.socket_active, (void *)Cmd, sizeof(Cmd), 0,
> (struct sockaddr *)&sin, (socklen_t *)&sin_len);
>
> However, select never returns when I send the device a message!
Read the man page for select again. You probably don't want to be
passing 1 for the first parameter to select.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss