I have a bit of a strange problem and I first have to say that I am not 100 % sure if it is runRev related at all. But anyway, here is what I'm doing:
I have a socket connection with runRev as the server and an application written in C++ as the client, using my own protocol. Everything works fine except that if runRev receives a specific message (let's call it "theEvilMessage"), the message is read twice from the socket, either appended in one message or sequencially. The code I use to read from the socket is
Code: Select all
on gotSocketData pSocket, pData
split pData using tab
switch pData[1]
case "theEvilMessage"
-- do something unrelated
break
end switch
read from socket sSocket with message "gotSocketData"
end gotSocketData
As far as I can tell, the C++ application only sends the message once. At least the write method of the qt 4.5 TcpSocket class is only called once, that I am sure of.
My question is: Has anyone experienced similar phenomena? Does anybody know what my problem is?
I hope someone can help. If you need further information, I will be happy to provide it.
Thanks in advance,
Stefan