Socket receive string timeout

Discuss OrbForms Designer and PocketC Architect

Postby lazarus on Mon Sep 18, 2006 9:59 pm

socket s;

I am using the s.recvs code to retrieve information sent from another network TCP socket. I am using a simulated TCP server and the POSE application. Side A is the orbform appl and side B is the other side of the socket.

I can send from sideA, the orbform appl running on the POSE, since I see the other socket receive and display it.

However, I cannot seem to receive text in the POSE appl coming from the other side.

The appl times out with the err_timeout_code. Is the recvs method waiting for a specific character to indicate the end? Something like \r\n or \0 that will push the text up to the method and return without a timeout.

I have tried the s.listen(1) method with no success.
Posts: 8
Joined: Sun Jul 24, 2005 9:23 pm

Postby lazarus on Tue Sep 19, 2006 4:10 am

Well, I guess a little sleep and exercise really does wonders. The answer is the NULL character, \0. Just add this to the end of the transmitting side and voila, s,recvs works fine! Zero my hero!
Posts: 8
Joined: Sun Jul 24, 2005 9:23 pm

Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 2 guests