iOS Question Socket messages

techknight

Well-Known Member
Licensed User
Longtime User
I noticed with TCP/IP Socket connections, that every once in awhile that the packet never makes it. and I got to send it 2 or 3 times before it finally gets there. I am using a socket connection with Astreams.

Is there a way to test the socket to see if the packet made it? and if not, resend?
 

techknight

Well-Known Member
Licensed User
Longtime User
Yea I dont know.

What I am doing is connecting directly to a Digi xBee style WiFi adapter at a specific port. It creates a serial link which works ok. But... Every once in awhile if I am sending packets say every 100 to 200ms, it sorta jitters, its never consistent. Most of the time it works, but every once in awhile, things "hang" and the packets never reach the device for a few seconds, then it picks back up again, sometimes getting them out of order. Acting like UDP strangely enough. It does the same things with android as well.

Then, In one instance in my program I have a disconnect subroutine. it sends a packet to the destination socket, and then closes astream, and closes the socket. 95% of the time the packet never makes it before the socket closes. I need to know if there is a way to "test" if a packet got there?

And sometimes when I first open the socket and its successful, I send a packet to the device that logs into the device, and the device replies back. Every once in awhile the login packet never makes it, because I never get a response back. I have to hit the button again, and then it works.

Its very possible its the Digi WiFi adapter, but I dont know, no way to tell?
 
Upvote 0
Top