Chapter 17. TCP/IP
373
(Example)
STATUS% = 0
ON ERROR GOTO TCP.ERR
'Prepare for error interrupt (To TCP.ERR
'at the time of error occurrence)
DEV.OPEN:
'<<<<< Open communications device processing (OPEN "COM1" / OPEN "COM3:") >>>>>
STATUS% = 1
TCP.CONNECT:
'<<<<< Connect to TCP/IP Communications pathway processing >>>>>
'<<<<< (CALL “SOCKET.FN3” 41 / 42) >>>>>
STATUS% = 2
TCP.SOCKET:
'<<<<< Create socket processing (CALL “SOCKET.FN3 26) >>>>>
STATUS% = 3
'<<<<< Transfer data or file processing via socket interface >>>>>
'<<<<< Close the socket processing (CALL “SOCKET.FN3 28) >>>>>
STATUS% = 2
'<<<<< Disconnect TCP/IP communications pathway processing >>>>>
'<<<<< (CALL “SOCKET.FN3 43) >>>>>
STATUS% = 1
'<<<<< Close communications device processing (CLOSE) >>>>>
STATUS% = 0
ON ERROR GOTO 0
RETURN
'****************************************************
' Error-handling routine processing
'****************************************************
TCP.ERR:
WERR = ERR
RESUME ERRSUB
ERRSUB:
ON ERROR GOTO ERRSUB2
Comentarios a estos manuales