General > QB64 Discussion
TCP/IP in QB
Galleon:
Due to the lack of feedback on the TCP/IP proposal I've decided to go ahead with the implementation of this prototype. Since the last proposal I have also decided:
1. GET/INPUT can be used with any variables and will set EOF if there was not enough data to store in them (in which case the programmer might try again later), this would not apply to variable length strings which would simply be 0-length after reading no data.
2. A generic function will be added which returns the 'healthy status' of a network handle as a boolean value(ok/not ok). If it returns not ok the programmer can assume the connection has (for whatever reason) definitely failed. It would be completely optional to use this and the programmer would be recommended to also have in place common-sense 'time-out' precautions.
Bear in mind the idea behind this is to create a generic networking interface which could be used with with any kind of connection/network, not just TCP/IP. I may even implement a way for programs to communicate with each other via the Windows clipboard (just kidding).
Work has begun on this, so far the following function calls are implemented and work:
--- Code: ---long myhost=func__openhost(qbs_new_txt("TCP/IP:7319"));
long myclient=func__openclient(qbs_new_txt("TCP/IP:7319:localhost"));
long myconnection=func__openconnection(myhost);
if (!myconnection) exit(0);
--- End code ---
Which in QB64 will look like this:
--- Code: ---myhost=_OPENHOST("TCP/IP:7319")
myclient=_OPENCLIENT("TCP/IP:7319:localhost")
myconnection=_OPENCONNECTION(myhost)
IF myconnection=0 THEN END
--- End code ---
Clippy:
--- Quote ---Due to the lack of feedback on the TCP/IP proposal I've decided to go ahead with the implementation of this prototype.
--- End quote ---
LOL, is that something like "High demand"?
I've never done any of that IP stuff. If you get time perhaps you can explain more about it and how it could be useful. Or somebody else could.
Would you like these added to the WIKI? We could use a little more info on what parameters are allowed in the functions.
Ted
MystikShadows:
Nice work there Galleon,
TCP/IP is the kind of thing that no one talks about, but now that it's there, everyone is gonna take a crack it it, love it, get addicted to it, and make even their hello world programs have access to TCP/IP lol.
so is it in high demand? not right now, cause it wasn't in there lol. will it be in high demand, wait and see. :)
Eponasoft:
And only time will tell who will be the first chump to try to make an MMORPG with it... :D
coma8coma1:
--- Quote from: Eponasoft on September 05, 2009, 06:47:05 PM ---And only time will tell who will be the first chump to try to make an MMORPG with it... :D
--- End quote ---
i hope so! fingers crossed! :D
Navigation
[0] Message Index
[#] Next page
Go to full version