11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

acceptConnection<br />

Syntax<br />

acceptConnection(svr_socket, blocking_mode, timeout, in_addr, in_name,<br />

socket_handle)<br />

Note: This function is case-sensitive. If you want it to be case-insensitive, you<br />

must compile your programs using the BASIC command with the -i option.<br />

Description<br />

Use the acceptConnection function to accept an incoming connection attempt on the<br />

server side socket.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

svr_socket The handle to the server side socket returned by initServerSocket().<br />

blocking_mode 0 - default (blocking)<br />

1 - blocking. In this mode and the current blocking mode of svr_socket<br />

is set to blocking, acceptConnection() blocks the caller until a<br />

connection request is received or the specfied time_out has expired.<br />

2 - non-blocking. In this mode if there are no pending connections<br />

present on the queue, acceptConnection() returns an error status code.<br />

In this mode, time_out is ignored.<br />

time_out Timeout in milliseconds.<br />

acceptConnection Parameters<br />

acceptConnection 1-75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!