Jump to content
×
×
  • Create New...
  • 0

How can I send data from gameserver to external server?


Mind Rapist

Question

Hello devs it's been a while... Today I have a very strange question: how can I send a request from the gameserver (FreeBSD) to an external server (Windows)? I want to create an XML file that contains the status of the channels (Auth, DB, Ch1,2,3,4,5,6, World server (game99)) and I want my gameserver to send a request that changes the values in the XML on the other server every time a channel is launched or shut down. I know it can be done with the shell files I just don't know how to do it. I appreciate any help :)

Link to comment

12 answers to this question

Recommended Posts

  • 0
  • Premium
8 minutes ago, Mind Rapist said:

Hello devs it's been a while... Today I have a very strange question: how can I send a request from the gameserver (FreeBSD) to an external server (Windows)? I want to create an XML file that contains the status of the channels (Auth, DB, Ch1,2,3,4,5,6, World server (game99)) and I want my gameserver to send a request that changes the values in the XML on the other server every time a channel is launched or shut down. I know it can be done with the shell files I just don't know how to do it. I appreciate any help :)

You mean in client?

Link to comment
  • 0
  • Moon
1 hour ago, Mind Rapist said:

how can I send a request from the gameserver (FreeBSD) to an external server (Windows)?

If I understood it right.. you should do it the other way around.

Windows server -> FreeBSD (game) server.

which means .. Windows server requests the channels data and the FreeBSD returns the values or an xml file which will be saved by the windows server.

and you can use the API for that :)

good luck.

Link to comment
  • 0
11 minutes ago, metin2team said:

If I understood it right.. you should do it the other way around.

Windows server -> FreeBSD (game) server.

which means .. Windows server requests the channels data and the FreeBSD returns the values or an xml file which will be saved by the windows server.

and you can use the API for that :)

good luck.

Actually I want to make the FreeBSD request an edit to the XML from the Windows server every time a channel starts or stops. What API can I use for this?

Link to comment
  • 0

Maybe I understood.

There are a lot of ways to do this.

One of this is via webserver. 

On windows server install a Webserver with PHP support or asp.net (for example Microsoft IIS).

Create a php page that catch GET input and write your xml.

On start and stop script for your gameserver do a curl on your webpage passing via GET method the channel and core and the status.

The curl command could be something like this:
curl

Hidden Content

    Give reaction to this post to see the hidden content.

Hidden Content

    Give reaction to this post to see the hidden content.

  • Love 1
Link to comment
  • 0

You can use python sockets. In that case your windows server is the server and the FreeBSD machine is the client.

server.py and client.py are in the attachments since I am not allowed to post formatted texts in here .... :facepalm:

Hidden Content

    Give reaction to this post to see the hidden content.

Hidden Content

    Give reaction to this post to see the hidden content.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.