Waits for a connection on a socket.
The input parameter, socket, must be a value returned from either SOCKET_INIT or SOCKET CONNECT.
SOCKET_ACCEPT listens on the port represented by the input parameter, socket. Immediately upon making a connection, a new socket is assigned to handle the communication flow. This new socket is represented by the returned value connection.
PRO SERVER port = 1500 socket = SOCKET_INIT(port) connection = SOCKET_ACCEPT(socket) data = BYTARR(15) nbytes = SOCKET_READ(connection,data) PRINT, 'SERVER received: ', STRING(data) SOCKET_CLOSE, connection SOCKET_CLOSE, socket ENDSee Also
For more detailed information on using the socket routines, see Interapplication Communication Using the Socket OPI.