Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - QNET unblocking open/read when connection lost: (2 Items)
   
QNET unblocking open/read when connection lost  
Hello!
I have troubles with bloking open/read functions in /net folder for 10.5 sec when/while remote node host is shutdown. 
Situation: 
Two QNET nodes QNX6.5 NodeA,NodeB. On NodeB exist file (named shared mem of application) "/net/NodeB/DIR/DIR/file". 

QNET started with default options. 
In nodeA run code like this:
fd=open("/net/NodeB/DIR/DIR/file", O_RDONLY| O_NONBLOCK);  
...
whle(1)
{
ins sr = read(fd, &buff, sizeofbuff);
}
...
and when turn off (or "shutdown now") nodeB, nodeA bloking on read(fd, &buff, sizeofbuff) for 10.5 sec.
I tried stat(), select(), poll() functions in while circle instead read(), they blocks too. My application run in 
realtime mode and couldn't wait for...

What safe method for read from remote /net QNET node I should use?
or may be needs custom options QNET starts with? 
Re: QNET unblocking open/read when connection lost  
solved with custom options:periodic_ticks,tx_retries