I need to init socket in C++ (GNU GCC) without libraries. When I Googled it, it suggested to use WinSock Library or something like this. How to do this? Thank you for answers.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot. The C++ language as defined by the standard has no socket specification. To work with them, you necessarily have to use some implementation-specific libraries, like WinSock.
I would recommend you use Boost’s ASIO library, which does all the hard and dirty work for you.