OpenTcpStream Writes but not Reads

Blitz3D Forums/Blitz3D Programming/OpenTcpStream Writes but not Reads

KuRiX(Posted 2006) [#1]
Hello again friends. I have a problem with TcpStreams and some computers when TCPStreaming to a Web to get html code.

OpenTcpStream works, because the returned value is not zero. Then i write the get method, bla, bla, but i never can Read Anything...

The strange is that it works perfectly on some computers but not others.

I know what you are thinking... firewalls, anti-virus, etc...

But that's not the problem, i have switched All Off. I know that must be a computer-problem, but perhaps you have seen this problem before and you can say: he, kuri, switch off the option bla bla bla....

Well, thanks anyway ;)


jfk EO-11110(Posted 2006) [#2]
writing to the stream works? you may use a php script that is capable of storing your blitz access, then dump it to a page that can be seen from within a browser.

I have noticed not all servers are woring the same (eg. to keep a stream usable and busy, you need to read out all content using while wend eof to allow ongoing IO usage of a stream).

So regarding to the example in the docs (no answer from apollo yet thingie) you need to add while eof(stream)=0:dummy=readline$(stream):wend after every received message of the server. Message means the server may send several lines or whatever, only to switch from read to write and back requires to read out the buffer.

Not sure if this is useful for you.


KuRiX(Posted 2006) [#3]
Thanks for your answer jfk. The problem is that my game access a php server, and it works in 99% of the computers.

So i know the problem is computer-related... si my question is: not considering firewalls and antivirus, how is possible that internet explorer can access a web page, but in blitz i can't !!!


jfk EO-11110(Posted 2006) [#4]
Probably you're doing something wrong. Then again, if it's really 99% then you shouldn't worry too much, there's always a few % that have somekind of problem with anything.

You say the browser can access the script, but blitz can't. How about to run a little blitz server on a properly working computer, then access it from the machine with the problem, then simply dump the browser request to a file. Also dump your game access to a file, then compare what's diffrent between them.

BTW do you access port 80 or what?


KuRiX(Posted 2006) [#5]
Yes, i use port 80. Sorry to be repetitive, but it is a problem with the computer. I have that problem only in two computers (and 300 users have tried the game, with no problems).

The most strange, is that in one of them, everything was fine, then, suddenly, one day, stop working.

The first thing i tried was to uninstall the firewall, the antivirus, and deactivate windows xp firewall, but nothing worked. The computer was having a problem with netshell.dll, but i fixed it.

I know that reinstalling the computer will surely fix the problem, but if i only know where is the problem...

Anyway, thanks jfk, very much appreciated...