Page 1 of 1

Sending info to server with which we are not connected yet

Posted: Tue Feb 06, 2018 3:47 pm
by fury22uk
Hi. I was wondering if there is possibility to send some one off calls like rmis from client to server and vice versa, but before connecting player to the server? So send some requests before even calling "connect xx.xx.xx.xx"

Re: Sending info to server with which we are not connected yet

Posted: Tue Feb 06, 2018 5:53 pm
by personwithhat2
Not sure...

NetEntity handles RMI indexing, and RMI declaration needs to happen on both sides (hence a entity/component needs to be sync'd over).....and all this obv can only happen after connecting.

Maybe you can send a message using some of the inner stuff, check out how "connect" triggers and how they send 'immediate packet' messages. Maybe you can combine sort of both and have it work?

Re: Sending info to server with which we are not connected yet

Posted: Thu Feb 15, 2018 10:00 am
by Cry-Flare
What is the purpose? Perhaps we can figure an alternative solution.

Re: Sending info to server with which we are not connected yet

Posted: Thu Feb 15, 2018 11:24 am
by fury22uk
Well, the original purpose was to create a simple login system without involving 3rd party server, just by using single cryengine server instance. I know I could connect to the server and create login system in there, but I wanted to do it all on the client sending single requests to remote server, and then have a list of available servers. Ended up using sql database directly from client.

Re: Sending info to server with which we are not connected yet

Posted: Thu Feb 15, 2018 1:23 pm
by Cry-Flare
Have you checked out the CryLobby module?

Re: Sending info to server with which we are not connected yet

Posted: Thu Feb 15, 2018 1:29 pm
by sunfluxgames
Wouldn't he just be creating a listen host and pass the information to where it needs to go?

Normal mmorpg servers are dedicated servers that connect to mysql or mssql and proccess the login information via database.

I still dont understand why you want a login system on the client side. Thats very dangerous to security.

Re: Sending info to server with which we are not connected yet

Posted: Thu Feb 15, 2018 3:04 pm
by fury22uk
Nope. I don't want to create login system on the client side. I want to send packets with info about typed login and password to the server, then server checks database and returns whether client can connect to it at all or not. And YES, I want to create listen host to past info to, but HOW do I listen to incoming packets using cryengine server instance?

Re: Sending info to server with which we are not connected yet

Posted: Thu Feb 15, 2018 4:10 pm
by sunfluxgames
CryLobby module contains the ability to create a listen server. It also has a class for sending and receiving packets.

They use bit streams so you will have to get use to stream operators but its still pretty basic.

As for a dedicated server find where the socket connects the client.

Create a class to load your database (mysql or mssql). Also inside these modules are event that control the info about the data.


Are you looking for code or just functions?

(So you know the LISTEN and DEDICATED are very plain and they only contain connections and reading and writing data to socket)

Code: Select all

(Packet class) CCryLobbyPacket* pPacket use macro #ifdef DEDICATED_SERVER