QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: leobarn on April 20, 2019, 05:30:45 am

Title: Possible BUG in _OPENCONNECTION
Post by: leobarn on April 20, 2019, 05:30:45 am
Hello,

I'm new to this board, just downloaded and installed QB64.
I like networking so did that.

newclient = _OPENCONNECTION(host) this give me a negative connectHandle of -3
This is no problem for _CONNECTIONADDRESS(newclient) this can handle negative numbers.
But INPUT #newclient, a is not working because INPUT can't handle negative numbers.

Is this a BUG or ??????

Kind regards,
Leo Barnhoorn.
Title: Re: Possible BUG in _OPENCONNECTION
Post by: FellippeHeitor on April 20, 2019, 07:57:31 am
Negative numbers are used by QB64 to differentiate between a file and a TCP/IP connection, that's not the problem.

It's actually an old issue with PRINT/INPUT for TCP/IP (the wiki indicates they're only available up to version 0.954 of QB64: http://www.qb64.org/wiki/INPUT_(TCP/IP_statement) (http://www.qb64.org/wiki/INPUT_(TCP/IP_statement))). You should stick to PUT/GET instead.

Here's an article you may find useful: https://www.qb64.org/articles/articletcpip.txt
Title: Re: Possible BUG in _OPENCONNECTION
Post by: leobarn on April 27, 2019, 08:23:23 am
Hello Fellippe,

Thank you for the message.
It is clear now.

Kind regards,
Leo Barnhoorn.