HTTPSocket or TCPSocket ?

HTTPSocket or TCPCocket, that is the question !

Your opinion is welcome.

Depends on what you want to accomplish. If you want to send requests to websites HTTPSocket should be sufficient.

Hi Ashot,

thanks.

And for downloading files, I’d better use TCPSocket ?

HTTPSocket is better for downloading files. http://documentation.xojo.com/index.php/HTTPSocket.Get

You can easily download directly to a folder item with it.

Yes, that is what I am tryng to use right now, but I have troubles with it:

incomplete file(s),
empty file(s),
unknow request (returned by the web server).

I also have freeze on a second download (sometimes).

That is why I was searching another way to do things.

[quote=175334:@Emile Schwarz]incomplete file(s),
empty file(s),[/quote]
Make sure your socket isn’t going out of scope before it finishes the job. HTTPSocket is the correct tool for the job.

HTTPSocket = TCPSocket + HTTP procotol.

Sometimes you use a raw TCPSocket and sometimes you download something from web via HTTP.

Thank you for the help/hilfe (Tim / Christian).