Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_onspx( <cprocedure>|<nkey> ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_ONSPX( <cProcedure>|<nKey> )


Parameters

<cProcedure>
Name of the procedure to call.

<nKey>
ASCII value of a key to stuff onto the keyboard.


Returns

NIL


Description

The procedure named in <cProcedure> is called when an SPX  or NetBios 
message has been received, or when a request for an SPX connection has 
been made. You must have called N_SPXLISTEN() at least once in order to 
be notified of incoming requests for connection.


Example

// Accept remote connections
N_SPXLISTEN()
N_ONSPX('GetSPX')
.
.
.
PROCEDURE GetSPX
   LOCAL cBuffer, nConnection
   IF N_SPXRECV() = 0           // Connection made
      ? 'CONNECT'
   ELSE                         // Message received
      ? 'Receiving a message...'
      nConnection = N_SPXRECV(@cBuffer)
      ? 'Connection number: ', nConnection
      ? 'Bytes received: ', LEN(cBuffer)
   ENDIF
   .
   .
   .
RETURN



See Also: N_ONIPX() N_SPXRECV() N_SPXSTATUS()

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