Hello,
I have two QNX machines communicating using Tcpip (for test purposes). The
client sends a 26 byte command message. The server is in an infinite loop
with a blocking read statment at the top:
THE PROBLEM: Immediately after startup, the very first message received by
the ‘read’ statment in the server always returns 0 bytes and no data is
placed in the msg buffer. The ‘read’ becomes unblocked as expected, but no
data is read-in. However, subsequent messages are read just fine! It is only
the first message after startup that seems to get lost.
Hello,
I have two QNX machines communicating using Tcpip (for test
purposes). The client sends a 26 byte command message. The server is
in an infinite loop with a blocking read statment at the top:
THE PROBLEM: Immediately after startup, the very first message
received by the ‘read’ statment in the server always returns 0 bytes
and no data is placed in the msg buffer. The ‘read’ becomes
unblocked as expected, but no data is read-in. However, subsequent
messages are read just fine! It is only the first message after
startup that seems to get lost.
What am I doing wrong or what could I be missing?
Using QNX 4.25, Tcpip 5.00A
I guess, you didn’t use select() … there’s a complete example in
the docs of ‘TCP/IP for QNX4.25’ (Programmers Guide → A Scoket-based
IPC Tutorial → Stream connection → Establishing a socket →
tut7.c).
HTH,
:Karsten.
Mit freundlichen Grüßen aus Krefeld,
With best regards from Krefeld,