How is carried out the connection between a client and a dedicated server?

Tell me please, how the communication and transmission of information between a client and a dedicated server UE4?
At the moment I’m trying to create a socket between the client and the server. At the same time, the server part has been working with databases.

But if the client and server when the connection is already established sockets, or something just as effective, and the server is on the same machine as the database, then I do not make sense to try to create another type of socket for connection and should take the optimization of queries to the database data.

I apologize for my English is not my native language :slight_smile: