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