Guest User

Untitled

a guest
Jul 19th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.38 KB | None | 0 0
  1.  
  2. ; Socket practice
  3.  
  4. ; server info
  5. $ipServer = "50.112.115.220"
  6. $portServer = 6667
  7.  
  8. TCPStartup()
  9. $hSock = TCPConnect($ipServer, $portServer)
  10.  
  11. if $hSock == -1 Then
  12.    ConsoleWrite("Error: " @CRLF)
  13.    Exit
  14. EndIf
  15.  
  16. ; loop
  17.  
  18. while 1
  19.    
  20.    $buff = TCPRecv($hSock, 1024)
  21.    if $buff == -1 Then
  22.       ConsoleWrite("Error: " & @error)
  23.       Exit
  24.    EndIf
  25.    ConsoleWrite($buff);
  26. WEnd
Add Comment
Please, Sign In to add comment