Help for this page

Select Code to Download


  1. or download this
    use Socket;
    $mysockaddr = getsockname(SOCK);
    ...
    printf "Connected from %s [%s]\n",
       scalar gethostbyaddr($myaddr, AF_INET),
       inet_ntoa($myaddr);