Did you try the MSDN sample ?
https://learn.microsoft.com/en-us/windows/win32/winsock/finished-server-and-client-code
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi!
Can someone point me to a good and easy to follow tutorial/guide/project example for sockets (server + client, and I need multithreading for server)? For what I'm working on, I only need to transfer strings (it would be nice if you can send std::string, but if not, being able to send char[] is also fine as I can change it to std::string after). And in case it does matter, I'm only interested in socket for Windows.
For a bit more details, I'm working on an Unreal Engine project, and it is using C++ but you don't necessary need to write code, but instead use their blueprints system, and if you have a programming background (in my case Java), using those is really easy as you understand the workflow. Now here comes the problem, and that is that I need to transfer strings between the project and a server, and so I need to write code for this part with socket.
In Java the code for sockets is really easy, and you can send even objects without changing them. Unfortunately the examples for C++ that I found via Google/YouTube weren't that easy to understand, some even used 3rd party software for the server, and only wrote the code for client?!
Any help is appreciated, thanks!
Did you try the MSDN sample ?
https://learn.microsoft.com/en-us/windows/win32/winsock/finished-server-and-client-code