Quantcast
Channel: MEGA65 FORUM
Viewing all articles
Browse latest Browse all 662

RE[5]: TCP/IP API:s for BASIC and assembler?

$
0
0

Deft/Paul - just reviewing what I said about a timeout option and the code example, I would like to emphasize how useful it would be to have the network I/O engine actually track connection requests and let them (eventually) fail if the host doesn't respond. While Paul's example assumes that the web server on 203.19.107.1 picks up the call, the harsh reality may turn out to be completely different.

Hence, it would be nice if the BASIC I/O for network connections would provide a third argument, perhaps something like this:

<IP-address>[:port-number][/timeout-in-seconds]

The adjusted example code would probably look something similar to this:

OPEN1,20,0,"203.19.107.1:80/15"
IF ST=0 THEN PRINT #1,"GET / HTTP/1.0" + CHR$(13) ELSE PRINT "NETWORK ERROR"


Viewing all articles
Browse latest Browse all 662

Trending Articles