Integration openssl with libwww

Hello.

I tried to make a program with openssl and libwww.
There is no problem making library and link it, but there is some miss operation
in socket operation.
(I didn't use libwww's SSL module. I just make it by myself)


HTTCP.c : HTDoConnect()
case TCP_NEED_CONNECT:
	status = connect(HTChannel_socket(host->channel), (struct sockaddr *) &host->sock_addr,
                 sizeof(host->sock_addr));
        if (NETCALL_ERROR(status))
        {
        if (NETCALL_WOULDBLOCK(socerrno))
        {
            HTTRACE(PROT_TRACE, "HTDoConnect. WOULD BLOCK `%s'\n" _ hostname);
#ifndef _WINSOCKAPI_

            HTHost_register(host, net, HTEvent_CONNECT);
#endif /* _WINSOCKAPI_ */
            return HT_WOULD_BLOCK;
        }
#ifdef _WINSOCKAPI_
        if (NETCALL_INVAL(socerrno)) {
            host->tcpstate = TCP_CONNECTED;
            HTTRACE(PROT_TRACE, "Connection to HTHost %p is already in progress.\n"
_ host);
            break;
        }
#endif /* _WINSOCKAPI_ */

        if (socerrno == EISCONN) {
            host->tcpstate = TCP_CONNECTED;
            HTTRACE(PROT_TRACE, "HTHost %p going to state TCP_CONNECTED.\n"
_ host);
            break;
        }
        if (NETCALL_DEADSOCKET(socerrno))     /* We lost the socket */
        {
            host->tcpstate = TCP_NEED_SOCKET;
            HTTRACE(PROT_TRACE, "HTHost %p going to state TCP_NEED_SOCKET.\n"
_ host);
            break;
        }

Without openssl it works corecctly, but with openssl library, it goes TCP_ERROR
state immediately.(I accessed with http protocol)
It doesn't check 'NETCAL_WOULDBLOCK' or 'NETCALL_INVAL'.

What the problem?
I hope someone have experience of integrating openssl with libwww.

Configure :
OS : Windows 2000
Compiler : MSVC++ 6.0
Openssl : 0.9.6c
libwww 	: 5.3.1




________________________________________
³×¶ì¾Ó ÇÁ¸®¹Ì¾ö ¸ÞÀÏ ¿ÀÇÂ! (SMTP, ½ºÆÔ¸ÞÀÏ ÇÊÅ͸µ Á¦°ø) http://www.netian.com/premium_mail/main.html

Received on Saturday, 16 March 2002 00:57:27 UTC