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. Winsock Interrupt

Winsock Interrupt

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminworkspace
4 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.
  • S Offline
    S Offline
    simoncoul
    wrote on last edited by
    #1

    I have created a small program that creates a 5 byte TCP packet to a server then the server sends it back. I'm unsure of how the wisock send and recv functions work exactly, does it just poll the connection until there is something in the buffer or is there an interrupt. I'm suppost to setup an interrupt, so any info you know or a good place I could find this info would be great! Thanks Simon

    M N 2 Replies Last reply
    0
    • S simoncoul

      I have created a small program that creates a 5 byte TCP packet to a server then the server sends it back. I'm unsure of how the wisock send and recv functions work exactly, does it just poll the connection until there is something in the buffer or is there an interrupt. I'm suppost to setup an interrupt, so any info you know or a good place I could find this info would be great! Thanks Simon

      M Offline
      M Offline
      markkuk
      wrote on last edited by
      #2

      Interrupt handling will happen in the device driver level, not in Winsock or in the transport service provider that implements the TCP/IP protocol.

      1 Reply Last reply
      0
      • S simoncoul

        I have created a small program that creates a 5 byte TCP packet to a server then the server sends it back. I'm unsure of how the wisock send and recv functions work exactly, does it just poll the connection until there is something in the buffer or is there an interrupt. I'm suppost to setup an interrupt, so any info you know or a good place I could find this info would be great! Thanks Simon

        N Offline
        N Offline
        Nuxser
        wrote on last edited by
        #3

        Default behavior of send(...) & recv(...) is blocking on the call till requested operation is finished. Not aware of how this wait is internally implemented. As an application programmer, I assume that you want to model your application so that it doesn't block on such calls and utilize the CPU cpu cycles for other tasks. If that is correct, you need to explore which I/O strategy we want to use: http://tangentsoft.net/wskfaq/articles/io-strategies.html Translating the "interrupt" to be the case where instead of blocking you want the program to be notified when data is there to read, WSAAsyncSelect() can be an easy path to go as your app/window is notified through message loop. -- Soyuz

        S 1 Reply Last reply
        0
        • N Nuxser

          Default behavior of send(...) & recv(...) is blocking on the call till requested operation is finished. Not aware of how this wait is internally implemented. As an application programmer, I assume that you want to model your application so that it doesn't block on such calls and utilize the CPU cpu cycles for other tasks. If that is correct, you need to explore which I/O strategy we want to use: http://tangentsoft.net/wskfaq/articles/io-strategies.html Translating the "interrupt" to be the case where instead of blocking you want the program to be notified when data is there to read, WSAAsyncSelect() can be an easy path to go as your app/window is notified through message loop. -- Soyuz

          S Offline
          S Offline
          simoncoul
          wrote on last edited by
          #4

          Thanks for the information helped me alot!

          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