_Added in 1.9.0_ *$sockname* Returns the name of a socket during [[on SOCKCLOSE]], [[on SOCKLISTEN]], [[on SOCKOPEN]], [[on SOCKREAD]] and [[on SOCKWRITE]] [[Scripting_Events|events]]. *Example*
; Open a socket connection to 'google.com' port '80'. /sockopen Example www.google.com 80 ; Listen for the on SOCKOPEN event. on *:SOCKOPEN:*:{ ; Print the name of the socket. echo -ag Sockname is $sockname ; Close the socket. sockclose $sockname }