From adb994efe63b31c160a2f1981de5268c3a39be1e Mon Sep 17 00:00:00 2001 From: John Bintz Date: Tue, 4 Apr 2023 16:57:17 -0400 Subject: [PATCH] Final update before release --- API.md | 8 ++++---- README.md | 9 +++++++++ examples/HTTP Client Example.amos | Bin 2976 -> 3052 bytes examples/HTTP Client Example.basic | 4 ++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/API.md b/API.md index 4f6d5d3..fbba5c4 100644 --- a/API.md +++ b/API.md @@ -125,8 +125,6 @@ a remote socket to send you data. * 0 on timeout. * -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. #### RESULT=Socket Async Wait Writing(Socket, Wait_ms) @@ -139,8 +137,10 @@ has been completed. * 0 on timeout. * -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. +* -3 on the socket having an error. + * 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. #### RESULT=Socket Set Timeout(Socket, Wait_ms) diff --git a/README.md b/README.md index 26a5b90..69c1fad 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,10 @@ Reserve As Work 30,1024 For I=1 To 100 If ALREADY_CONNECTED=-1 RESULT=Socket Wait Async Writing(SOCKET,100) + If RESULT=-3 + Print "Socket connect failure!" + Exit + End If If RESULT>0 ALREADY_CONNECTED=0 @@ -172,6 +176,11 @@ to contact me. * First public release +### 1.0.1 (2023-04-04) + +* Fix bug in Socket Wait Async Writing where result of getsockopt was + incorrectly used. + ## Development ### Environment diff --git a/examples/HTTP Client Example.amos b/examples/HTTP Client Example.amos index ebcc95169e36e07e6be5722c48ca14846283f677..84a1d0ade7799f2231bc025ab1f3440976e4679e 100644 GIT binary patch delta 552 zcmZXQOD_Xa6vzMf%*?%=mZ&jF>s75ZB4SY?EHn}pVxtxw3z1MYQIDuhhZQ!gSzK$8 zegkPDR+biGA(mokBk>*T&X|yJ7boZb&--_s_)OT7vvc$5sbY1jlwKMd9!UeSmmB+r zu|oZUowAIjQ@K+0fK~>MB+=G>qlSXjpc*`-SaMtYU@3Vn675RGa-edKYNfQ}c)0Yd z>Sy{T1=bVt~VSst3DX*mnB6fm{%o_TShoCJ;O;8dRQ(>{^SU zd(5csZ(6PK7$j;yOH@BZAMC|F*C|yF9k;l?>!cmmt+*M$h|-nzh9sZ~dR12UE$M)* z)4g^Z4oS&((b@LHfCMlkR4ga0$i;XQVHM%pxj%QWa63?P5h{D${-#2KBdi#&->Q6z zBu#Qvt5L$X%}2yzGyS_4wmeh9T%m(eQZ$Bm|>rRgsk^vEDDrD0)-? delta 470 zcmZutze_?<7(Ms;yw@K~>4T?bPYtIgt)L}@BHXH>CXqx;QVSH{EgEbp8f&;t4H5na zA~ZHOG(@w1KoCU#f_>^sD7xI?<9y$D&iT%#^(4wMMaZXQ^OPh0P_hmAgn)V)%r5$>q04+pFE@gTQJ|IU1U>f|% zv+Oo(o%YR#r@pxaGLm{r`oMQv07nt7RQiwCf-onDk5`py9+7>tQSc7_LEEHE%rla& zvv*=obJTTGgkzDBLHfUrs=7y=`(uLTshjHG`4<=+&x?m8RdOA%H+Swe5T{JP0vCS# esB0Bmi0 ALREADY_CONNECTED=0 End If + If RESULT=-3 + Print "Unrecoverable error!" + Exit + End If End If If ALREADY_CONNECTED=0