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> ipxsocketclose()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 IPXSocketClose()
------------------------------------------------------------------------------
 Purpose:
 Close the current listening IPX socket.

 Syntax:
 IPXSocketClose()

 Parameters:
 None.

 Returns:
 Nothing.

 The CA-Clipper name for this function is:
 IPXSktCls()

 Description:
 IPXSocketClose() closes the currently open IPX socket that is listening
 for incoming IPX packets. This socket number is the one that was opened
 by IPXSocketOpen() 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( IPXSocketOpen( 17767 ) = 0 )
    ? "Listening on IPX socket 17767"
    do while ( (iCounter--) > 0 )
       lpszPacket = IPXPacketGet(@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
    IPXSocketClose()
 endif

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

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

See Also: IPXInstalled() IPXSocketOpen() IPXPacketGet() IPXPacketSend()

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