home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 1997 / CT_SW_97.ISO / pc / software / entwickl / win95 / pw32i306.exe / lib / winsock.pm < prev   
Text File  |  1995-12-02  |  5KB  |  321 lines

  1. package Winsock;
  2.  
  3. require Exporter;
  4. #require DynaLoader;
  5. #require AutoLoader;
  6.  
  7. @ISA = qw(Exporter); #DynaLoader);
  8. # Items to export into callers namespace by default. Note: do not export
  9. # names by default without a very good reason. Use EXPORT_OK instead.
  10. # Do not simply export all your public functions/methods/constants.
  11. @EXPORT = qw(
  12.     AF_APPLETALK
  13.     AF_CCITT
  14.     AF_CHAOS
  15.     AF_DATAKIT
  16.     AF_DECnet
  17.     AF_DLI
  18.     AF_ECMA
  19.     AF_HYLINK
  20.     AF_IMPLINK
  21.     AF_INET
  22.     AF_IPX
  23.     AF_ISO
  24.     AF_LAT
  25.     AF_MAX
  26.     AF_NETBIOS
  27.     AF_NS
  28.     AF_OSI
  29.     AF_PUP
  30.     AF_SNA
  31.     AF_UNIX
  32.     AF_UNSPEC
  33.     EADDRINUSE
  34.     EADDRNOTAVAIL
  35.     EAFNOSUPPORT
  36.     EALREADY
  37.     ECONNABORTED
  38.     ECONNREFUSED
  39.     ECONNRESET
  40.     EDESTADDRREQ
  41.     EDQUOT
  42.     EHOSTDOWN
  43.     EHOSTUNREACH
  44.     EINPROGRESS
  45.     EISCONN
  46.     ELOOP
  47.     EMSGSIZE
  48.     ENAMETOOLONG
  49.     ENETDOWN
  50.     ENETRESET
  51.     ENETUNREACH
  52.     ENOBUFS
  53.     ENOPROTOOPT
  54.     ENOTCONN
  55.     ENOTEMPTY
  56.     ENOTSOCK
  57.     EOPNOTSUPP
  58.     EPFNOSUPPORT
  59.     EPROCLIM
  60.     EPROTONOSUPPORT
  61.     EPROTOTYPE
  62.     EREMOTE
  63.     ESHUTDOWN
  64.     ESOCKTNOSUPPORT
  65.     ESTALE
  66.     ETIMEDOUT
  67.     ETOOMANYREFS
  68.     EUSERS
  69.     EWOULDBLOCK
  70.     FD_ACCEPT
  71.     FD_CLOSE
  72.     FD_CONNECT
  73.     FD_OOB
  74.     FD_READ
  75.     FD_SETSIZE
  76.     FD_WRITE
  77.     FIOASYNC
  78.     FIONBIO
  79.     FIONREAD
  80.     HOST_NOT_FOUND
  81.     IMPLINK_HIGHEXPER
  82.     IMPLINK_IP
  83.     IMPLINK_LOWEXPER
  84.     INADDR_ANY
  85.     INADDR_BROADCAST
  86.     INADDR_LOOPBACK
  87.     INADDR_NONE
  88.     INVALID_SOCKET
  89.     IN_CLASSA_HOST
  90.     IN_CLASSA_MAX
  91.     IN_CLASSA_NET
  92.     IN_CLASSA_NSHIFT
  93.     IN_CLASSB_HOST
  94.     IN_CLASSB_MAX
  95.     IN_CLASSB_NET
  96.     IN_CLASSB_NSHIFT
  97.     IN_CLASSC_HOST
  98.     IN_CLASSC_NET
  99.     IN_CLASSC_NSHIFT
  100.     IOCPARM_MASK
  101.     IOC_IN
  102.     IOC_INOUT
  103.     IOC_OUT
  104.     IOC_VOID
  105.     IPPORT_BIFFUDP
  106.     IPPORT_CMDSERVER
  107.     IPPORT_DAYTIME
  108.     IPPORT_DISCARD
  109.     IPPORT_ECHO
  110.     IPPORT_EFSSERVER
  111.     IPPORT_EXECSERVER
  112.     IPPORT_FINGER
  113.     IPPORT_FTP
  114.     IPPORT_LOGINSERVER
  115.     IPPORT_MTP
  116.     IPPORT_NAMESERVER
  117.     IPPORT_NETSTAT
  118.     IPPORT_RESERVED
  119.     IPPORT_RJE
  120.     IPPORT_ROUTESERVER
  121.     IPPORT_SMTP
  122.     IPPORT_SUPDUP
  123.     IPPORT_SYSTAT
  124.     IPPORT_TELNET
  125.     IPPORT_TFTP
  126.     IPPORT_TIMESERVER
  127.     IPPORT_TTYLINK
  128.     IPPORT_WHOIS
  129.     IPPORT_WHOSERVER
  130.     IPPROTO_GGP
  131.     IPPROTO_ICMP
  132.     IPPROTO_IDP
  133.     IPPROTO_IP
  134.     IPPROTO_MAX
  135.     IPPROTO_ND
  136.     IPPROTO_PUP
  137.     IPPROTO_RAW
  138.     IPPROTO_TCP
  139.     IPPROTO_UDP
  140.     IP_ADD_MEMBERSHIP
  141.     IP_DEFAULT_MULTICAST_LOOP
  142.     IP_DEFAULT_MULTICAST_TTL
  143.     IP_DROP_MEMBERSHIP
  144.     IP_MAX_MEMBERSHIPS
  145.     IP_MULTICAST_IF
  146.     IP_MULTICAST_LOOP
  147.     IP_MULTICAST_TTL
  148.     IP_OPTIONS
  149.     MAXGETHOSTSTRUCT
  150.     MSG_DONTROUTE
  151.     MSG_MAXIOVLEN
  152.     MSG_OOB
  153.     MSG_PARTIAL
  154.     MSG_PEEK
  155.     NO_ADDRESS
  156.     NO_DATA
  157.     NO_RECOVERY
  158.     PF_APPLETALK
  159.     PF_CCITT
  160.     PF_CHAOS
  161.     PF_DATAKIT
  162.     PF_DECnet
  163.     PF_DLI
  164.     PF_ECMA
  165.     PF_HYLINK
  166.     PF_IMPLINK
  167.     PF_INET
  168.     PF_IPX
  169.     PF_ISO
  170.     PF_LAT
  171.     PF_MAX
  172.     PF_NS
  173.     PF_OSI
  174.     PF_PUP
  175.     PF_SNA
  176.     PF_UNIX
  177.     PF_UNSPEC
  178.     SIOCATMARK
  179.     SIOCGHIWAT
  180.     SIOCGLOWAT
  181.     SIOCSHIWAT
  182.     SIOCSLOWAT
  183.     SOCKET_ERROR
  184.     SOCK_DGRAM
  185.     SOCK_RAW
  186.     SOCK_RDM
  187.     SOCK_SEQPACKET
  188.     SOCK_STREAM
  189.     SOL_SOCKET
  190.     SOMAXCONN
  191.     SO_ACCEPTCONN
  192.     SO_BROADCAST
  193.     SO_CONNDATA
  194.     SO_CONNDATALEN
  195.     SO_CONNOPT
  196.     SO_CONNOPTLEN
  197.     SO_DEBUG
  198.     SO_DISCDATA
  199.     SO_DISCDATALEN
  200.     SO_DISCOPT
  201.     SO_DISCOPTLEN
  202.     SO_DONTLINGER
  203.     SO_DONTROUTE
  204.     SO_ERROR
  205.     SO_KEEPALIVE
  206.     SO_LINGER
  207.     SO_MAXDG
  208.     SO_MAXPATHDG
  209.     SO_OOBINLINE
  210.     SO_OPENTYPE
  211.     SO_RCVBUF
  212.     SO_RCVLOWAT
  213.     SO_RCVTIMEO
  214.     SO_REUSEADDR
  215.     SO_SNDBUF
  216.     SO_SNDLOWAT
  217.     SO_SNDTIMEO
  218.     SO_SYNCHRONOUS_ALERT
  219.     SO_SYNCHRONOUS_NONALERT
  220.     SO_TYPE
  221.     SO_USELOOPBACK
  222.     TCP_BSDURGENT
  223.     TCP_NODELAY
  224.     TRY_AGAIN
  225.     WSABASEERR
  226.     WSADESCRIPTION_LEN
  227.     WSAEACCES
  228.     WSAEADDRINUSE
  229.     WSAEADDRNOTAVAIL
  230.     WSAEAFNOSUPPORT
  231.     WSAEALREADY
  232.     WSAEBADF
  233.     WSAECONNABORTED
  234.     WSAECONNREFUSED
  235.     WSAECONNRESET
  236.     WSAEDESTADDRREQ
  237.     WSAEDISCON
  238.     WSAEDQUOT
  239.     WSAEFAULT
  240.     WSAEHOSTDOWN
  241.     WSAEHOSTUNREACH
  242.     WSAEINPROGRESS
  243.     WSAEINTR
  244.     WSAEINVAL
  245.     WSAEISCONN
  246.     WSAELOOP
  247.     WSAEMFILE
  248.     WSAEMSGSIZE
  249.     WSAENAMETOOLONG
  250.     WSAENETDOWN
  251.     WSAENETRESET
  252.     WSAENETUNREACH
  253.     WSAENOBUFS
  254.     WSAENOPROTOOPT
  255.     WSAENOTCONN
  256.     WSAENOTEMPTY
  257.     WSAENOTSOCK
  258.     WSAEOPNOTSUPP
  259.     WSAEPFNOSUPPORT
  260.     WSAEPROCLIM
  261.     WSAEPROTONOSUPPORT
  262.     WSAEPROTOTYPE
  263.     WSAEREMOTE
  264.     WSAESHUTDOWN
  265.     WSAESOCKTNOSUPPORT
  266.     WSAESTALE
  267.     WSAETIMEDOUT
  268.     WSAETOOMANYREFS
  269.     WSAEUSERS
  270.     WSAEWOULDBLOCK
  271.     WSAHOST_NOT_FOUND
  272.     WSANOTINITIALISED
  273.     WSANO_ADDRESS
  274.     WSANO_DATA
  275.     WSANO_RECOVERY
  276.     WSASYSNOTREADY
  277.     WSASYS_STATUS_LEN
  278.     WSATRY_AGAIN
  279.     WSAVERNOTSUPPORTED
  280.     _WINSOCKAPI_
  281.     h_addr
  282.     h_errno
  283.     s_addr
  284.     s_host
  285.     s_imp
  286.     s_impno
  287.     s_lh
  288.     s_net
  289. );
  290. sub AUTOLOAD {
  291.     # This AUTOLOAD is used to 'autoload' constants from the constant()
  292.     # XS function.  If a constant is not found then control is passed
  293.     # to the AUTOLOAD in AutoLoader.
  294.  
  295.     local($constname);
  296.     ($constname = $AUTOLOAD) =~ s/.*:://;
  297.     $val = constant($constname, @_ ? $_[0] : 0);
  298.     if ($! != 0) {
  299.     if ($! =~ /Invalid/) {
  300.         $AutoLoader::AUTOLOAD = $AUTOLOAD;
  301.         goto &AutoLoader::AUTOLOAD;
  302.     }
  303.     else {
  304.         ($pack,$file,$line) = caller;
  305.         die "Your vendor has not defined Winsock macro $constname, used at $file line $line.
  306. ";
  307.     }
  308.     }
  309.     eval "sub $AUTOLOAD { $val }";
  310.     goto &$AUTOLOAD;
  311. }
  312.  
  313. boot_Winsock;
  314.  
  315. # Preloaded methods go here.
  316.  
  317. # Autoload methods go after __END__, and are processed by the autosplit program.
  318.  
  319. 1;
  320. __END__
  321.