Final update before release

This commit is contained in:
John Bintz 2023-04-04 16:57:17 -04:00
parent 191a4f7cff
commit adb994efe6
4 changed files with 17 additions and 4 deletions

8
API.md
View File

@ -125,8 +125,6 @@ a remote socket to send you data.
* 0 on timeout. * 0 on timeout.
* -1 on error. Use `Socket Errno` for more detail. * -1 on error. Use `Socket Errno` for more detail.
* -3 on the socket being sorta-ready. This isn't a connection timeout,
so check again.
* 1 on success. * 1 on success.
#### RESULT=Socket Async Wait Writing(Socket, Wait_ms) #### RESULT=Socket Async Wait Writing(Socket, Wait_ms)
@ -139,8 +137,10 @@ has been completed.
* 0 on timeout. * 0 on timeout.
* -1 on error. Use `Socket Errno` for more detail. * -1 on error. Use `Socket Errno` for more detail.
* -3 on the socket being sorta-ready. This isn't a connection timeout, * -3 on the socket having an error.
so check again. * If you're using this function to test for a successful connection and
receive a -3, close and reopen the socket, otherwise subsequent
checks will return 1.
* 1 on success. * 1 on success.
#### RESULT=Socket Set Timeout(Socket, Wait_ms) #### RESULT=Socket Set Timeout(Socket, Wait_ms)

View File

@ -50,6 +50,10 @@ Reserve As Work 30,1024
For I=1 To 100 For I=1 To 100
If ALREADY_CONNECTED=-1 If ALREADY_CONNECTED=-1
RESULT=Socket Wait Async Writing(SOCKET,100) RESULT=Socket Wait Async Writing(SOCKET,100)
If RESULT=-3
Print "Socket connect failure!"
Exit
End If
If RESULT>0 If RESULT>0
ALREADY_CONNECTED=0 ALREADY_CONNECTED=0
@ -172,6 +176,11 @@ to contact me.
* First public release * First public release
### 1.0.1 (2023-04-04)
* Fix bug in Socket Wait Async Writing where result of getsockopt was
incorrectly used.
## Development ## Development
### Environment ### Environment

Binary file not shown.

View File

@ -52,6 +52,10 @@ For I=1 To 100
If RESULT>0 If RESULT>0
ALREADY_CONNECTED=0 ALREADY_CONNECTED=0
End If End If
If RESULT=-3
Print "Unrecoverable error!"
Exit
End If
End If End If
If ALREADY_CONNECTED=0 If ALREADY_CONNECTED=0