toilatoi Posted July 10, 2017 Share Posted July 10, 2017 I want send a REQUEST and RESPONSE via TCP/IP connections. Here my code but it not work. please help me. Thank for all. Global $MainSocket Local $MaxLength = 1512; Maximum Length Of Text Local $Port = 3333; Port Number Local $Server = '192.168.1.59'; Server IpAddress TCPStartup() $MainSocket = TCPConnect($Server, $Port) If $MainSocket = -1 Then Exit MsgBox(16, "Error", "Unable to connect.") Local $Data1 ='{"id":0,"jsonrpc":"2.0","method":"miner_getstat1"}' TCPSend($MainSocket, "miner_restart") TCPCloseSocket($MainSocket) $Data = TCPRecv($MainSocket, $MaxLength) MsgBox(0, "Received Packet", $Data) Link to comment Share on other sites More sharing options...
junkew Posted July 10, 2017 Share Posted July 10, 2017 First get help samples to work and understand what all functions can and cannot do https://www.autoitscript.com/autoit3/docs/functions/TCPSend.htm toilatoi 1 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now