How to implement a timeout in read function call?

Posted by sasayins on Stack Overflow See other posts from Stack Overflow or by sasayins
Published on 2010-05-27T01:06:58Z Indexed on 2010/05/27 1:11 UTC
Read the original article Hit count: 277

Filed under:

Hi,

I want to use serial com port for communication and I want to implement a timeout every time I call the read function call.

int filedesc = open( "dev/ttyS0", O_RDWR );

read( filedesc, buff, len );

Thanks

© Stack Overflow or respective owner

Related posts about c