Good day. There was a need to create a socket. I was looking for a normal example on the Internet with comments, but I could not find a normal one (maybe my hands are curved) ...

I would be grateful for an example with comments. thank

    4 answers 4

    If you don’t have anything against boost, then many examples on boost :: asio - http://www.boost.org/doc/libs/1_52_0/doc/html/boost_asio/examples.html

      Creating a socket is just calling socket with the correct parameters. They are different. At one time, this mega-state greatly helped me (there are in different languages, in html / pdf)

      For those who find it difficult to speak English, you can read free and incomplete translations into Russian and Ukrainian .

      • Is there anything in Russian? - mazanax
      • there is . But who guarantees its quality? :) I recommend to check with the English original. Well, to learn some English. - KoVadim
      • Thank. I know about English - my eternal problem :) - mazanax

      I was helped in due time by article with the unrolled example of the server and the client corresponding to it: Running the Winsock Client and Server Code Sample (Windows)

      ps: in the current state of MSDN , look for old articles more and more difficult

        I once studied for this article: http://www.rsdn.ru/article/unix/sockets.xml

        In general, searching for "programming sockets" can help much more.