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


> 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


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