VB 6 SSL support

By NetMan1958 ·
I have been searching for an answer to this for 2 days and haven't come up with a suitable solution. I am trying to write a small app in Visual Basic (version 6) that does the following:
(1)Establish a SSL session with a remote server on port 9004 without wrapping it in http or using ftp.
(2)Send a string of data.
(3)Receive the response and display it to the user.

The VB6 Inet control doesn't work because it only uses ftp, http or https. The Winsock control doesn't implement the SSL part.

I have this process implemented on a linux server using PHP but need to port it to a stand-alone windows app. This is the PHP code that does the job:

$requeststr = "\0020-12345-6789:SPKT:0:KB:Random Ascii Data:E0001\003"
// End Define variables
$sock = fsockopen("ssl://", 9004, $errno, $errstr, 30);
if (!$sock) {
die("$errstr ($errno)\n");
else {
fwrite($sock, "$requeststr");
while ("\003" !== ($result = fgetc($sock)))
echo $result;

Any suggestions for implementing this in VB?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Related Discussions

Related Forums