Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> ipxsktcls()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 IPXSktCls()
------------------------------------------------------------------------------
 Purpose:
 Close the current listening IPX socket.

 Syntax:
 IPXSktCls()

 Parameters:
 None.

 Returns:
 Nothing.

 Description:
 IPXSktCls() closes the currently open IPX socket that is listening
 for incoming IPX packets. This socket number is the one that was opened
 by IPXSktOpn() to start listening for incomimg packets from another
 workstation.

 Example:
 // To open IPX socket 17767 ( 0x4567 ) and listen for 30
 // seconds for an incoming packet. Close the socket when a packet is
 // received, or when the 30 seconds has run out, or when the request is
 // cancelled by the user.
 iCounter = 30
 iPacketLength = 0
 if( IPXSktOpn( 17767 ) = 0 )
    ? "Listening on IPX socket 17767"
    do while ( (iCounter--) > 0 )
       lpszPacket = IPXPktGet(@iPacketLength)
       if empty( lpszPacket )
          iKey = inkey(1)
          if iKey != 27
             loop
          else
             ? "Listen Cancelled by user"
             exit
          endif
       else
          ? "Packet received :", lpszPacket
          exit
       endif
    enddo
    if( iCounter = 0 )
       ? "Ran out of time"
    endif
    IPXSktCls()
 endif

 Notes:
 By default the listening socket is 21845 ( 0x5555 ) unless
 IPXSktOpn() is given an explicit socket number to listen on.

 To find the current listening socket, use IPXSktNumGet().

See Also: IPXInstalled() IPXSktOpn() IPXPktGet() IPXPktSnd()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson