Author | Topic: TCPIP Socket and SSL | |
---|---|---|
Clyde Annach | TCPIP Socket and SSL on Tue, 28 May 2002 08:52:22 -0400 We need to open a socket to a secure web site (one that is using SSL), send a request for data and then recieve the response. SocketOpen does not seem to work when you throw https:// in front of the URI. It fails to connect if you put http:// in front of the URI as well. It returns a Host Not Found error. Removing the http(s ) allows for the connection. We have looked into LoadFromURL, but we need to send and recieve HTTP packets. Is there something I am missing? Our code follows: default cDoc to "index.html" default cHostname to "www.proteledata.com" default nPort to 80 default nError to 0 cDoc := "GET /"+AllTrim(cDoc)+chr(13)+chr(10) nHandle := SocketOpen( SOCK_STREAM, cHostName, nPort, @nError ) SocketSend( nHandle, cDoc ) SocketRecv( nHANDLE, @cBUFFER, 4096, MSG_NORMAL ) -- Clyde Annach Senior Programmer Analyst Professional Teledata, Inc. Manchester, NH 03101 email clyde@proteledata.com | |
Clyde Annach | Re: TCPIP Socket and SSL - DISREGARD on Tue, 28 May 2002 09:33:25 -0400 I have come to find there are a few "issues" that I was unaware of previously. I will explain further once I have resolved them and clarified them myself. Thanks again, Clyde "Clyde Annach" <clyde@proteledata.com> wrote in message news:3cf37bf8@asgcom.alaska-software.com... > We need to open a socket to a secure web site (one that is using SSL), send > a request for data and then recieve the response. > > SocketOpen does not seem to work when you throw https:// in front of the > URI. It fails to connect if you put http:// in front of the URI as well. > > It returns a Host Not Found error. Removing the http(s ) allows for the > connection. > > We have looked into LoadFromURL, but we need to send and recieve HTTP > packets. > > Is there something I am missing? > > Our code follows: > > default cDoc to "index.html" > default cHostname to "www.proteledata.com" > default nPort to 80 > default nError to 0 > > cDoc := "GET /"+AllTrim(cDoc)+chr(13)+chr(10) > nHandle := SocketOpen( SOCK_STREAM, cHostName, nPort, @nError ) > SocketSend( nHandle, cDoc ) > > SocketRecv( nHANDLE, @cBUFFER, 4096, MSG_NORMAL ) > > > > > > > > > > -- > Clyde Annach > Senior Programmer Analyst > Professional Teledata, Inc. > Manchester, NH 03101 > email clyde@proteledata.com > > > > > |