i'm stuck in the middle of a small project. This is my first time working with WSK. My goal was achieve some communication beetween a socket client and server (my driver). My first approach worked pretty smooth, the single purpose was to send a text string from my socket client to the server and then send it back to the client, pretty much an echo server, to speed up my project I'm using a wrapper I found on github (wskudp/tcp):
CreateSocket -> Bind -> Accept (wait for incoming connection) -> Receive (loop) -> Send back what I received inside that loop.
This worked perfectly but while reading the documentation I found out about the PFN_WSK_RECEIVE_EVENT callback function. Therefore I decided to implement a receive callback instead of using a loop because this approach seemed cleaner to me. So I just enabled event callbacks for WSK_EVENT_RECEIVE and implemented the callback function. This worked pefectly as the callback events fires every time I'm sending something to the server but when I tried to send back the message to my client from within the receive event callback function the client only receives the first message and then it immediately BSODs, usually I'm getting MULTIPLE_IRP_COMPLETE_REQUESTS. While it works perfectly when sending back data in a receive loop it doesn't work when using the event callback. Am I getting something wrong here, is this not a viable approach?
It looks like you're new here. If you want to get involved, click one of these buttons!
|Upcoming OSR Seminars|
|Developing Minifilters||29 July 2019||OSR Seminar Space|
|Writing WDF Drivers||23 Sept 2019||OSR Seminar Space|
|Kernel Debugging||21 Oct 2019||OSR Seminar Space|
|Internals & Software Drivers||18 Nov 2019||Dulles, VA|