Hello everyone, looks like I need your help once again =)
I’m not really sure if I’m doing thing in the right way, so here is what I’m trying to achieve;
I’m making an online game, where users must login first, so I’ll be abe to show em their statistics, bought items and so on. For this I have made so called “QueryServer” which is working with database, and managing UE4 dedicated serrvers, by launching instances for each game session.
So, simplified “login screen” → “game session” process looks like so:
-
- User is launched game client
- User enter his/her credentials
- Game client connecting to the “QueryServer”
- If OK, sending credentials to the “QueryServer” (SSL)
- The “QueryServer” processes the credentials and generating clientToken
- If OK, the “QueryServer” returns the clientToken, info about bought items, characters stats, etc. to the game client
- User gets to the next stage, where he sees his character, bought items, etc.
- User presses the "Play button
- The QueryServer building teams (Actually there is separated “TeamBuilder” server) and launching an UE4 dedicated server instance (actually there is always few more instances than needed)
- Users/Clients which will parcipiate in the game session (teams) will get a responce from the QueryServer, which contain information about UE4 dedicated server IP, port, etc.
- game starts…
I have wrote some nice code to communicate with the QueryServer, and it’s works like a charm. But when broke the code in methods, and added these to my BlueprintLibrary class, the compiler sad this: “Unrecognized type ‘FSocket’ - type must be a UCLASS, USTRUCT or UENUM”. Is there any way to use methods with FSocket* type in blueprints?
If no, what is the best place to define a “Global” variable, in C++ project, so i can store the connection there?
I mean a place, so i can define the variable once, and it will be defined until user close the game client…
Thank you for reading