Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cant open socket on HTTPS using oScript 1

Status
Not open for further replies.

karlnolan

Programmer
Jul 5, 2006
1
IE
Hi All,

I'm currently trying to open a HTTPS socket to access a dll which works on HTTP using GET. I'm using LiveLink 9.5 SP1

The code I'm using is;

sock.(Socket.pStreaming) = TRUE
Socket.Connect(sock, request.SERVER_NAME, Str.StringToInteger(request.SERVER_PORT))
Socket.Write(sock, Str.Format("GET %1 HTTP/1.0", strPath))
Socket.Write(sock, Web.CRLF)
Socket.Write(sock, Web.CRLF)
Socket.Flush(sock)


I also tried to use; Socket.kSecuritySSL2 and Socket.kSecuritySSL3 but it says in the API help that this may not be supported;

I saw something on the KC but it didn't really help me;


Can anyone help? all suggestions will be appreciated;

Regards Karl
 
Your problem is putting the pStreaming property on the socket. This is to be used only with the "StreamUntil" and "StreamBytesUntil" socket calls. On a normal Socket.Write call with .pStreaming set you get back an empty string.

We tried this below and it works fine (HTTP)

//////////////////////////////////////////
boolean ok = true

Dynamic fsocket = Socket.Create()

Socket.Connect(fsocket, "localhost", 80)


//fsocket.pStreaming = TRUE
fsocket.pBlocking = TRUE

Socket.Write(fsocket, Str.Format("GET %1 HTTP/1.0",
"/Livelink921B/livelink.exe"))

Socket.Write(fsocket, Web.CRLF)
Socket.Write(fsocket, Web.CRLF)
Socket.Flush(fsocket)

response = Socket.Read(fsocket)


Socket.Close(fsocket)



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top