1 post in this topic
I'm having issues getting a TCPSend/TCPRecv to work. I'm creating the socket ok, but when I send my XML request over the first time, I get a response that it was invalid. Subsequent requests after that, I get no response from the server at all. I spoke to the sysAdmin for the server and he said that it locked out my port because it received 1000's of requests. But there are no loops in my code and the total time to process the script was 0.94 seconds. Any ideas?
createTCP() Func createTCP() TCPStartup() ; Start the TCP service. ; Register OnAutoItExit to be called when the script is closed. OnAutoItExitRegister("OnAutoItExit") Opt("TCPTimeout", 10000) Local $sIPAddress = TCPNameToIP("the.server.com") $iPort = 60008 ; this port is assigned to this app Local $iSocket = TCPConnect($sIPAddress, $iPort) if @error Then Exit EndIf ;get xml request contents $XMLData = GetXMLReq("mydata", "mydata", "mydata", "mydata") ;send xml request TCPSend($iSocket,$XMLData) $Response = TCPRecv($iSocket, 1024) EndFunc Func OnAutoItExit() TCPShutdown() ; Close the TCP service. logit("TCP Shutdown") EndFunc ;==>OnAutoItExit