Python Forum
How can i create a server for already existing client using Python?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can i create a server for already existing client using Python?
#21
(Aug-18-2020, 08:46 AM)Chapanson Wrote:
Quote:If the details of the server and the protocol used by the client and server aren't publicly available
What do you mean by that?

In an earlier post, you quoted Wikipedia to say a server emulator is a clone of some proprietary software. That means its source code isn't available and presumably a description of the messages that the client and server send to each other isn't available publicly either. If you want to create a server that mimics what the original does, you need to infer that information somehow. How else are you going to produce a server that an existing client can talk to?
Reply
#22
The first task is to investigate how server and client communicates.
This requires knowledge about:
  • networking and protocols
  • protocols for serialization. For example, CSGO uses Protocol Buffers from google.
  • packet analyzing, make assumptions about the meaning of the packets

The second task is, to replicate what the server is doing.
This requires understanding how to write a server which can handle more than one connection at the time.


You can use for example already existing documentation.
The a2s protocol for Source Dedicated Engine is described here: https://developer.valvesoftware.com/wiki/Server_queries
But it's not the communication between server <-> client. This is just to query information about a game server. The server browser uses it. So implementing a csgo-emulator-server requires to implement a2s, rcon and the unknown protocol between server <-> client.

In addition, a game server has state about the current world, positions of players, health, etc.
The communication follows often the concept of Key-Frames and Delta-Frames. Key-Frames holds all information about current state and the Delta-Frames have only information about state changes, which relies on the server state.

If you want to write a game server emulator, then choose a simple game server.
Otherwise, you can make your own gameserver (not emulator) with Pygame. You'll also find some examples if you google.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Paramiko Server -- Exception (server): Error reading SSH protocol banner ujlain 3 4,282 Jul-24-2023, 06:52 AM
Last Post: Gribouillis
  Client/Server proper finalizing transfer wolfman5874 1 1,423 Jul-04-2022, 07:35 PM
Last Post: wolfman5874
Bug Problem connecting TLS client written in C++ and Twisted server gpropf 0 1,361 Jun-12-2022, 05:57 PM
Last Post: gpropf
  Server/client basic communication ebolisa 0 2,009 Sep-30-2021, 12:22 PM
Last Post: ebolisa
  Client server Multithreading Anan 6 5,757 Apr-21-2021, 08:19 PM
Last Post: SheeppOSU
Question Trouble with Client/Server reverse Shell! Gilush 0 2,757 Feb-03-2021, 01:04 PM
Last Post: Gilush
  Basic client server code question swisscheese 4 3,192 Dec-12-2020, 08:51 AM
Last Post: Larz60+
  Simple TCP Client and TCP Server Problem Vapulabis 5 4,336 Jul-12-2020, 05:09 PM
Last Post: ndc85430
  how to send an image from server to client using PICKLE module dafdaf 1 3,067 Jun-02-2020, 01:08 PM
Last Post: nuffink
  how can i send a list of tuples from the server to the client using sockets? dafdaf 1 3,833 Apr-13-2020, 10:51 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020