Author Topic: TCP Stuff  (Read 2361 times)

So what I am trying to do, is make an Add-on grab a file from an HTTP server, what am I doing wrong? I used the exact code form the bottom of this tutorial - http://forum.blockland.us/index.php?topic=266903.0. And I have an HTTP server open at my IP on port 8000, and I put all of the directories, my IP and port into the TCP_FileDL.Download(); and it wont download the file...

If you're grabbing the info from your own computer and trying to release said add-on it'll be a horrid idea unless you have a static IP.

That aside we can't help you without looking at your EXACT code, and it will also require some other information on your part, such as if you've opened that port on your router and allowed that port through your firewall. You should also check to make sure no other program is using that port. Instead of using 8000 I'd recommend using 28001

Im using a VPS for the http server, its up all the time, and The code, is literally cntrl+c sntrl+v from that topic

Then you don't have any coding that will allow you to download any files, that topic literally just sends "Sending Message" from the client and receives "Return Message" or do you mean the example at the bottom? Because that is purely client-side for one, and for two just doing TCP_FileDL.Download(); wont do anything at all, as you need to define %server %directory %port and %outputFile

Ok, I was trying it server sided, and I did put all that stuff in, so Im half right haha, thnx though, If you feel nice, all I need is a server sided, "GET" mod to download one file here and there over and over, but I can figure it myself too

What he means be "client-side" is that the code makes a TCP client to download from a web server
A TCP client is a client whether it's running on a blockland client or server

Ok, so I can use that in a server sided addon? sorry this is like BRAND new to me haha, and I just want there to be one file that a couple servers can reach and all be synched to

Yes, TCPObjects will function the same wherever they're used

Here is an add-on that does what you're trying to do. You could reference it

Yes, TCPObjects will function the same wherever they're used

Here is an add-on that does what you're trying to do. You could reference it
Thnx a ton, that helps alot

You can also check this out: http://forum.blockland.us/index.php?topic=266903.0

Edit: oh you have this link in your OP.
« Last Edit: January 10, 2015, 04:46:13 AM by elm »