Connecting UE5 client to a custom C++ server

Long story short,

I have a server that fed an old game engine that has become stale, started to convert the client code to unity, but there is alot of things I didn’t like, so I am looking to move the client to UE5.

I do not want to use the native networking in UE5 as I have a completely built and working custom server that has code from 5+ years of work. I do not want to convert all of this to the replication process that UE uses to drive multiplayer. I instead want to utilize my server that is made of (non-boost) asio for managing packets and C# code with aws integration.

Can someone direct me to some information on utilizing the UE engine as a basic client to send and receive packet information about game state? I really just need my UE5 actor to package tcp/udp and send them according to my server enum.

I am more than welcome to share some insight into the server side code if people are interested.

Thanks in advance.

If you give up the DS server architecture of UE4, then you have to give up the entire Gameplay framework.

I do it this way.
Declare a global client Socket variable directly

 namespace shine::client
{
	class AppManager
	{
	public:
		AppManager();
		~AppManager();
		void  init();
	};
	extern int  run();
	extern void onUpdate();
	extern TcpClient* __TcpClient;  //Tcp Client
}

Then send and receive data through your own custom API interface

Read Data:

	void onLogin(net::TcpClient* tcp)
	{
		uint16 childcmd = 0;
		tcp->read(childcmd);
		
		if (__OvInst != nullptr)
			__OvInst->onLoginCallBack(childcmd);
	}

Then you can go to the blueprint through the CMD command and the error code (childcmd) to do the corresponding things

send data:

__TcpClient->begin(cmd);
__TcpClient->sss(value);
__TcpClient->end(cmd);   //packet
      
1 Like

thank you! Going to experiment with this.