dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Is there any library that abstracts Winsock and Posix socket implementation?

  1. #1
    Join Date
    Jul 2017
    Posts
    48

    Is there any library that abstracts Winsock and Posix socket implementation?

    So, I know that socket programming depends on OS system calls but from my knowledge about operating systems (as a colleague) I know that when you are dealing with sockets you actually need 4 system calls, read(), write(), bind() and listen(). So Is there any good library that does some abstraction for these system calls and based on the OS you are running the program it initialize these functions with the system calls of that OS?

    I found this but if I'm correct what it basically tells you is that you have to implement both windows sockets and Posix sockets and control which code you compile using pre-processor statements.

    I don't want to do that every time, so I'm wondering if there is a good library out there that is abstracting that for me. I searched a lot of times and I can't find any...
    Also I want it to be c compatible too not only c++.

    Thank you

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,258

    Re: Is there any library that abstracts Winsock and Posix socket implementation?

    Quote Originally Posted by babaliaris View Post
    So, I know that socket programming depends on OS system calls but from my knowledge about operating systems (as a colleague) I know that when you are dealing with sockets you actually need 4 system calls, read(), write(), bind() and listen().
    It is only for server socket. And there is also accept()...
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)