I hook into the send
and recv
functions in Windows. In some situations I modify the data that's going to be sent and read. In the send
function, this is easy. I hook into the function, modify the source buffer and then pass it to the original function. But for the recv
function, this is more complicated. When I've called the original recv
function and I'm going to decide to add more data, I need to push data into the local queue so that the next call of recv
would return those bytes. Any ideas on that?
相关问题
- Sorting 3 numbers without branching [closed]
- Multiple sockets for clients to connect to
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
Your filter method should call recv() and then add your data to the end of the buffer, adjust the read count returned, and return it. No need to 'push data into the local queue'.