Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>opensock()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 OPENSOCK()
 Opens the socket for IPX or SPX communication
------------------------------------------------------------------------------
 Syntax

     OPENSOCK(<nSocket>) --> nOpen

     Netware: 2.2 and 3.11

 Argument

     <nSocket>  Designates the number of the socket that is opened.

 Returns

     OPENSOCK() returns the number of the socket if the socket has been
     opened successfully.  If an error occurs, the function returns 0.

 Description

     An IPX or SPX communication is handled through "sockets" (see the
     Introduction to this chapter).  OPENSOCK() allows you to explicitly open
     a socket before a call of IPXOPEN(), SPXESTBCON(), or SPXLISTCON().  If
     OPENSOCKET() is called with the argument 0, any available socket can be
     opened.  The socket's number is returned by OPENSOCK().

 Note

     .  The functions IPXOPEN(), SPXESTBCON(), and SPXLISTCON() open
        the source socket automatically.  A call of OPENSOCKET() is not
        necessary.

 Examples

     .  Open socket 20000:

        IF OPENSOCK(20000)=0
           ? 'Socket could not be opened!'
        ELSE
           ? 'Socket has been opened successfully!'
        ENDIF

     .  Open any available socket:

        ? 'Socket',OPENSOCK(0),' opened!'

See Also: CLOSESOCK() IPXOPEN() SPXESTBCON() SPXLISTCON()

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