Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Is CSocket a blocking socket ?

Is CSocket a blocking socket ?

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Girish601
    wrote on last edited by
    #1

    Hello Friends, I am been using CSocket in my application. But i want to know is CSocket a blocing socket or non-blocking socket, and what are the differences between them ?

    Girish Software Developer

    S M 2 Replies Last reply
    0
    • G Girish601

      Hello Friends, I am been using CSocket in my application. But i want to know is CSocket a blocing socket or non-blocking socket, and what are the differences between them ?

      Girish Software Developer

      S Offline
      S Offline
      S Douglas
      wrote on last edited by
      #2

      Girish601 wrote:

      But i want to know is CSocket a blocing socket or non-blocking socket, and what are the differences between them ?

      Hmmm MSDN->CSocket[^]

      CSocket Class MSDN wrote:

      A CSocket object also provides blocking, which is essential to the synchronous operation of CArchive. Blocking functions, such as Receive, Send, ReceiveFrom, SendTo, and Accept (all inherited from CAsyncSocket), do not return a WSAEWOULDBLOCK error in CSocket. Instead, these functions wait until the operation completes. Additionally, the original call will terminate with the error WSAEINTR if CancelBlockingCall is called while one of these functions is blocking.


      1 Reply Last reply
      0
      • G Girish601

        Hello Friends, I am been using CSocket in my application. But i want to know is CSocket a blocing socket or non-blocking socket, and what are the differences between them ?

        Girish Software Developer

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        See Windows Sockets: Blocking[^] CSocket is a high-level wrapper for a socket (SOCKET). To you, it's always blocking. Whether the underlying SOCKET is in blocking mode or not is handled by the CSocket implementation. For a non-blocking socket you can use the CAsyncSocket class or use Winsock APIs directly. Mark

        "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups