And let's say you're making a kind of server, so you'd need like 10 sockets open at the same time, what would be the way? run a thread or a loop arround socket listen/receive?
it's quite a long way to send a simple var, is it realy the simplest/best way?
If all you do is send a string, then it may seem that way.
You should realise that the sockets library makes network communication as easy as reading/writing a file. But initiating the connection is a little more complicated.
well I have used the microsoft reference and created a class for server and client, just to simplify the process(to avoid loo much code typing), and it works, but the code the site you posted uses is different, and for what I need it for(more clients connected simultaneusly) it's the stream server if I'm correct. http://www.beej.us/guide/bgnet/output/html/multipage/clientserver.html#simpleserver
this code is for a stream server, however it's quite different from the M$ one...
couldn't I simply modify the M$ server code with a kind of loop?