Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I establish a secure connection with SocketWrench?

0
Posted

How do I establish a secure connection with SocketWrench?

0

The ActiveX control has a property named Secure which is used to specify if a secure connection is to be established. To establish a secure client connection, set the property to a value of True before connecting to the server: SocketWrench1.Secure = True nError = SocketWrench1.Connect(strRemoteHost, nRemotePort) If nError Then MsgBox “Unable to establish a secure connection” EndIf With the library, your application will need to specify an option that requests that a secure connection be established with the server. For example: SOCKET sockClient; LPCTSTR pszRemoteHost = _T(“www.catalyst.com”); UINT nRemotePort = 443; UINT nTimeout = 120; if (InetInitialize(CSWSOCK4_LICENSE_KEY, 0L) == 0) { // Unable to initialize SocketWrench library return; } sockClient = InetConnectEx(pszRemoteHost, nRemotePort, INET_PROTOCOL_TCP, nTimeout, INET_OPTION_SECURE, 0, 0, NULL); if (sockClient == INVALID_SOCKET) { int nError = InetGetLastError(); if (nError == ST_ERROR_SECURITY_NOT_INITIALIZED) { // Unabl

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123