Author Topic: Network message flow  (Read 2019 times)

0 Members and 1 Guest are viewing this topic.

Offline hreintke

Network message flow
« on: August 17, 2012, 09:08:28 AM »
LS,

Exploring new parts of simutrans, now getting into networks.
I am looking into the several network*.cc & .h files to get an understanding but is somewhere documented what the message flow is that should occur when a client connects to a server. Also cannot find the format of the tcp message that is transferred.

FYI : I am looking for a way to have an non-simutrans program connecting as a client and requesting info from the simutrans server to display specific gameinfo.

Kind regards,

Herman

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8819
  • Total likes: 322
  • Helpful: 229
  • Languages: De,EN,JP
Re: Network message flow
« Reply #1 on: August 17, 2012, 09:09:51 AM »
Then just look at the nework tool. It can query serveral things from a remote game.

Offline hreintke

Re: Network message flow
« Reply #2 on: August 17, 2012, 12:34:55 PM »
Thanks Prissi,

Didn't know that. Nettools should indeed be a good starting point.

Herman

Offline hreintke

Re: Network message flow
« Reply #3 on: August 17, 2012, 04:45:38 PM »
LS,

Took some time and effort but I've got nettool compiled with mingw and is starting up.
However, I prefer to use msvc and I am stuck there. Lots of unresolved and now errors in duplicates in libcmt and msvrt.
Does anyone have nettools compile in msvc configured ?

When useing nettool I am asked for password. Tried setting public and first players password but no luck.
At which location/parameter is the server access password settable ?

Herman

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8819
  • Total likes: 322
  • Helpful: 229
  • Languages: De,EN,JP
Re: Network message flow
« Reply #4 on: August 17, 2012, 07:18:41 PM »
I think for the simple gameinfo string, you could just sent one command to the server. The nettool needs player1 password, imho.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4251
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Network message flow
« Reply #5 on: August 18, 2012, 08:20:53 AM »
At which location/parameter is the server access password settable ?
This is a password independent of player's passwords. It has to be specified when server is started.

Command line option: ' -server_admin_pw XXX', or simuconf.tab entry
Code: [Select]
server_admin_pw = test
Parsley, sage, rosemary, and maggikraut.