generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Can't send HTTP requests to python server

Previous Thread :: Next Thread 
resh123 is not online. resh123
Joined: 30 May 2011
Total Posts: 17
17 Sep 2016 12:08 PM
I want to experiment with some ideas of sending data between Roblox game servers and my computer, however, when I attempt to send a POST request to the python server I have running, it doesn't work.
I use PostAsync("http://(My IP address):4777", "test_data") with a python script running a socket server on port 4777.

For the test, the server is just supposed to receive the data and output it, but I get CURL error (curl_easy_perform): Couldn't connect to server (7)

Does anyone know what I am doing wrong?
Report Abuse
Monadic is not online. Monadic
Joined: 03 Aug 2016
Total Posts: 731
17 Sep 2016 12:16 PM
Make sure your socket allows both TCP and RSVP connections. Also, remember that HTTP is for port 80. Have the socket running on 4777 receive the TCP packet then transmit it through port 80.
Report Abuse
resh123 is not online. resh123
Joined: 30 May 2011
Total Posts: 17
17 Sep 2016 12:19 PM
Python doesn't allow me to do anything with port 80 because I have other things like Chrome's push notifications listening on port 80. Even trying to send it through port 80 it says that the port can only be used by one application.
Report Abuse
resh123 is not online. resh123
Joined: 30 May 2011
Total Posts: 17
17 Sep 2016 12:20 PM
That's why I had to try using another port
Report Abuse
Monadic is not online. Monadic
Joined: 03 Aug 2016
Total Posts: 731
17 Sep 2016 12:24 PM
So I'm guessing PostAsync("http://(My IP address):4777", "test_data") is the POST request.

Make sure your actual Python socket is using AF_INET and SOCK_STREAM not SOCK_DGRAM.
Report Abuse
resh123 is not online. resh123
Joined: 30 May 2011
Total Posts: 17
17 Sep 2016 12:25 PM
It's using everything recommended in the Roblox wiki and on the Python docs. I may be firewall blocking the connection, or my computer just not handling it properly
Report Abuse
Monadic is not online. Monadic
Joined: 03 Aug 2016
Total Posts: 731
17 Sep 2016 12:32 PM
The device its-self is not the problem. It COULD be a firewall.

I'm assuming your trying to connect to an address within your local subnet

IP = 'your ip'
TCP_PORT = 4777

1. Make sure you have a "proper" buffer size for your message.
2. make sure you're actually able to reach the desired host on the port. Simple CMD(I'm assuming you're using windows) ping on the host and port should do it.

You could then use as a connector
s.connect((IP, TCP_PORT))


However python is not my fortae'
Report Abuse
resh123 is not online. resh123
Joined: 30 May 2011
Total Posts: 17
18 Sep 2016 08:03 PM
So I figured out that when I test it using a local server from inside Studio, I can connect to the server using 127.0.0.1 or localhost, but not my public IP address. I'm assuming that using my normal IP will work when there is an actual server running.
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
18 Sep 2016 08:04 PM
hopefully that ip wont get ddosed
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
18 Sep 2016 08:06 PM
@wunder

are you dumb
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
18 Sep 2016 08:08 PM
^ "http://(My IP address)"
are you
if someone finds that or multiple servers keep posting to it
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
18 Sep 2016 08:09 PM
It won't happen because it'll be server sided.
Your dumb.
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
18 Sep 2016 08:12 PM
^ "it wont happen because it is server sided" you act like its impossible :/
there really is no 100% way to prevent it but it is always possible to some extent
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
18 Sep 2016 08:12 PM
and if someone steals the place they can easily look at the script so.... yea its again not impossible and you need to stop jumping to conclusions
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
18 Sep 2016 08:13 PM
yes because OP is going to just let them waltz into studio with his game, and look at his ip
or the fact that theres a 90% chance his ip is dynamic
and the fact that stealing server-sided scripts hasnt happened in a while and is very rare
so please leave
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
18 Sep 2016 08:14 PM
"and if someone steals the place"

you can steal it without being in studio, have you ever heard of something known as an 'exploit?'
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
18 Sep 2016 08:14 PM
youre probably a flux alt anyways so i dont need to argue with someone whos trying to be as incorrect as possible
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
18 Sep 2016 08:14 PM
and you do realize I addressed that right?
kid, you're like 12
you don't read
and you're stupid
so leave
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
18 Sep 2016 08:16 PM
"because OP is going to just let them waltz into studio with his game" you wouldnt know if your place has been stolen until you find out the hard way
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
18 Sep 2016 08:18 PM
Wunder, again, you incredibly amaze me with your reading skills.
That part addressed him willingly letting people in.
The second line below that I believe is what addressed place stealing.
Report Abuse
Monadic is not online. Monadic
Joined: 03 Aug 2016
Total Posts: 731
18 Sep 2016 08:54 PM
"kid you're like 12"
And you're some edgy 13 teen I bet.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image