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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 18 Sep 2016 08:04 PM |
| hopefully that ip wont get ddosed |
|
|
| Report Abuse |
|
|
| |
|
|
| 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 |
|
|
|
| 18 Sep 2016 08:09 PM |
It won't happen because it'll be server sided. Your dumb. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|