ActionScript TCP Socket cannot send message to some people

I wrote a socket server that communicates with my actioncript 3 flash game using the Socket class. This is a TCP connection, which I thought would mean that it is 100% sure that the sending message will be received by the server as it is done at a low level. Thus, if he was unable to send, he resubmitted the message.

This is similar to the case for two other people with whom I tested my build. However, with one person, sometimes (rare but not ignored), the message is not received by the server, even if it doesn't look like other people are using their systems. This person, however, has no problem with other professional multiplayer games, which means this is a problem with my build.

Is there anything I can do to make sure the message is being sent correctly and I am wrong about TCP being 100% secure because messages have to be resent on a low level error?

+2


source to share


4 answers


You are correct that this is a general problem, but the problem is general, independent of flash. I sent a message, but it was not received, what should I do? You need to check if your client code actually sent the message; you need to check that the message was left on the client machine; you need to check if the message has reached the server machine; and you need to check that the server application received the message. You will also want to make sure that your connection / socket between client and server is still alive.

When trying to diagnose this issue, assuming the error TCP is the wrong place to start. If you are using UDP, the story is different from UDP not guaranteeing delivery (but you already knew that, right?).



Repeating the previous suggestions, you should use Wireshark (or equivalent) to determine if a message leaves the client machine. You can start with your server to make sure nothing funny is happening there; however, if there really is no trace of the message on the server side, then you will need to provide some kind of client hardware to see what's going on there.

+5


source


You can always play with tcpdump or wireshark to see what's going on on the wire. If your problem is not TCP / IP layer related, these are too useful network troubleshooting tools not to learn.



+3


source


You are correct in your understanding of TCP, sort of. TCP provides a stream of data for your application where you can write data and it will come and go in order. That is, or course, assuming that the connection does not die, that it can. I would suggest using a program like wireshark, as Nikolai suggested determining that the correct information is actually being sent and matches the corresponding address. I would then use wireshark on the server to assert the same things. Are there any characteristics of the bond with character B that differ from person A or yourself? (wireless, etc.)

+2


source


Try sending messages (using native protocol) to the server from Person B using nc

If you can isolate the problem in the AS3 socket client or server side, this is already an important step.

Note. I successfully used ActionScript3 sockets on a project a few months ago, only the slightly tricky part is getting the domain policy server configured correctly.

Crazy idea: maybe recompile the kernel with this option? Network Packet Failure Notification Service (NET_DROP_MONITOR) Disclaimer: I've never tried this.

+1


source







All Articles