Home > Enterprise >  how to initialize sockets in linux environemnt
how to initialize sockets in linux environemnt

Time:10-05

I have a code snippet to initialize a sockets in windows. How would I initialize the socket in Linux environment.

    WSADATA wsa
    if(WAStartup(MkeWORD(2,2), $wsa) !=0 )
    {
    exit(0);
    }

CodePudding user response:

On Linux you don't initialize a network environment like WSA. Sockets can be used out of the box. See https://man7.org/linux/man-pages/man2/socket.2.html for documentation.

  • Related