Jump to content

How can I send data from gameserver to external server?


Recommended Posts

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
Share on other sites

  • 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
Share on other sites

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
Share on other sites

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
Share on other sites

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 http://123.123.123.123/write_xml.php?channel=CH1_1&status=start

https://www.freebsd.org/cgi/man.cgi?curl(1)

  • Love 1
Link to comment
Share on other sites

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:

This is the hidden content, please

This is the hidden content, please

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

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.