PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, October 22, 2022

[FIXED] how to initialize sockets in linux environemnt

 October 22, 2022     c, c++, linux, sockets     No comments   

Issue

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);
    }

Solution

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.



Answered By - TeaAge Solutions
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,208,615

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing