440
■
Note for run-time error 105h
Socket close processing (
SOCKET.FN3
, Function #28) following occurrence of run-time error
105h would not complete immediately. This is because a FIN packet will be transmitted repeat-
edly in the socket close processing until the communications device receives any response
from the server independent of the power on/off state of the communications device.
The socket close processing period may be shortened by changing the retry count that deter-
mines the number of FIN packet retransmission times and is controlled by
SOCKET.FN3
,
function #24, option #26.
(Example)
Sock.Err:
’Socket error-handling routine
print "ERR:";hex$(err.code%)
’Display error code
print "ERL:";hex$(err.line%)
’Display error line number
if sock.stts%>=3 then
’If OK until socket generation,
optname%=26
’set retry count
option=0
’No retry (transmit once)
call "socket.fn3" .fcSSckOpt sockfd%,optname%,option
call "socket.fn3" .fcClose sockfd%
’Close socket
end if
if sock.stts%>=2 then
’If OK until connection of TCP/IP
’communications pathway,
call "socket.fn3" .fcTDiscnn interface% ’Disconnect the pathway
end if
if sock.stts%>=1 then
’If OK until opening the spread
’spectrum communications device,
close #hCom3%
’close the device
end if
goto main
’To main program
Summary of Contents for BHT-BASIC 100 SERIES
Page 1: ......
Page 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Page 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Page 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Page 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...