Chapter 17. TCP/IP
375
Note for run
Note for runNote for run
Note for run-
--
-time error 105h
time error 105htime error 105h
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
repeatedly 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
determines the number of FIN packet retransmission times and is controlled by SOCKET.FN3,
function #24, option #26.
(Example)
Sock.Err: 'Socket error-handling routine
'processing
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" 24 sockfd%,optname%,option
call "socket.fn3" 28 sockfd% 'Close socket
end if
if sock.stts%>=2 then 'If OK until connection of TCP/IP
'communications pathway,
call "socket.fn3" 43 interface% 'Disconnect the pathway
end if
if sock.stts%>=1 then 'If OK until opening the spread
'spectrum communications device,
close #hCom% 'close the device
end if
goto main 'To main program
Kommentare zu diesen Handbüchern