Odd, SockOpen event shouldn't occur unless the socket was opened...
Use the command "/socklist" to view open sockets... Try $sockname instead of $socketname... Also check $sockerr is zero as the first line in *:sockread...
if ($sockerr) {
echo -s SockError $sockname $sockerr
return
}