什么是加工windows插槽IOCP模型和openssl [英] What's maching windows socket IOCP model and openssl

查看:209
本文介绍了什么是加工windows插槽IOCP模型和openssl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows Server System中例如在select model openssl中使用SSL_read函数来匹配recv函数,但是在IOCP模型上如何使用openssl函数来匹配WSARecv函数?因为在我的程序中有很多WSA ***功能,所以openssl BIO功能可能无法使用,我应该在这种情况下做什么?





感谢您的帮助。



我的尝试:



UINT nRetVal = WSARecv(socket,& m_wsaInBuffer,1,& dwIoSize,& ulFlags,& pReadOverlap-> m_ol,NULL);



我能做什么改成:



int nRetVal = SSL_read(m_pSsl,m_wsaInBuffer.buf,strlen(m_wsaInBuffer.buf)+ sizeof(char ));

In Windows Server System For example in select model openssl use "SSL_read" function to matching with "recv" function, but on the IOCP modle How can I use openssl function to matching with the "WSARecv" function ? Because of in my program have lot of "WSA***" function so that the openssl BIO function may be can not use, what I should do in this condition?


Thanks for you help.

What I have tried:

UINT nRetVal = WSARecv(socket, &m_wsaInBuffer, 1, &dwIoSize, &ulFlags, &pReadOverlap->m_ol, NULL);

what can i do changed into:

int nRetVal = SSL_read(m_pSsl, m_wsaInBuffer.buf,strlen(m_wsaInBuffer.buf) + sizeof(char));

推荐答案

我在2002年为Windows Developer Magazine写了一篇关于此的文章。你可以阅读它 here [ ^ ]。诀窍是使用生物对并通过OpenSSL引擎推送数据。



您可以为基于IOCP的解决方案使用类似的设计。诀窍是正常处理IOCP读取完成,然后将数据推送到BIO对,然后通过OpenSSL代码将其路由到您。
I wrote an article about this for Windows Developer Magazine back in 2002. You can read it here[^]. The trick is to use a bio pair and to push data through the OpenSSL engine.

You can use a similar design for IOCP based solutions. The trick is to handle your IOCP read completions normally and then push the data into your BIO pair and that routes it through the OpenSSL code and then back to you.


这篇关于什么是加工windows插槽IOCP模型和openssl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆