CAsyncSocket,  WinSock  what's the difference ?

Posted on 2005-04-11
Last Modified: 2012-06-27
What is the difference between  CAsyncSocket, WinSock ?

While reading some help files I run into WinSock which appears even more primitive than CAsyncSocket.

Could someone summaries the difference between CAsyncSocket and WinSock.
Question by:hansw77041
    1 Comment
    LVL 39

    Accepted Solution

    CAsyncSocket is an MFC class, while winsock is a native C interface. CAsyncSock uses Windows Messages to provide asynchronous event handling, i. e. all threads (CWinThread) get an infinite message loops. In winsock, you have no built-in event or thread-handling but have to do that job yourself using native WinAPI or runtime library.

    Regards, Alex


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
    Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
    The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now