Socket.ahk

Post your working scripts, libraries and tools
GeekDude
Posts: 827
Joined: 02 Oct 2013, 22:13

Socket.ahk

28 Jul 2017, 08:35

Socket.ahk

A socket class based on Bentschi's excellent "Socket Class (überarbeitet)".

Some of the changes that have been made:

  • Instead of accepting the address and port separately, they are passed as a single array of length 2 (similar to python)
  • SendText no longer includes the null terminator
  • The class is self contained and no longer requires an external helper function

Examples


Related projects




Download
zotune
Posts: 69
Joined: 17 Nov 2014, 17:57

Re: Socket.ahk

04 Oct 2017, 18:27

Thanks for the 'socket.ahk' script GeekDude. It's beyond awesome, and a great improvement upon the original.

Do you think you could make an example where you copy a file from client to server? I have yet to figure it out.
iPhilip
Posts: 285
Joined: 02 Oct 2013, 12:21

Re: Socket.ahk

11 Apr 2018, 13:15

Hi GeekDude,

Thank you for the Socket class. I found it easier to use than the AHKsock library by TheGood found here.

For a script that I am working on I dealt with a server that, at times, never responded so I modified the class to include a Timeout parameter as a static variable in the class. I set the default value to 5 seconds. See the updated class below. I marked the modified lines with a ; <<< comment.

Code: [Select all] [Expand] [Download] (Socket2.ahk)GeSHi © Codebox Plus

Cheers!

- iPhilip
Windows 7 Pro (64 bit) - AutoHotkey v1.1+ (Unicode 32-bit)

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 12 guests