Hello,
I want to know if and how it is possible to send informations via https or sll? I use a normal socket client and it is possible to send it via http, but I can´t find any informations how to send it in a secure way. It is not enough to only change the port to 443, isn´t it?
Here some code example how we do it now (using 9.1D):
CREATE SOCKET mhSocket NO-ERROR.
IF ERROR-STATUS:ERROR OR (VALID-HANDLE(mhSocket) = FALSE) THEN DO:
RUN log.p(mcLogFile, "ERROR*** Socket creation failed":U ).
DELETE OBJECT mhSocket NO-ERROR.
polResult =FALSE.
RETURN.
END.
RUN log.p(mcLogFile, "Socket Created":U ).
mhSocket:CONNECT("-H ":U + mcHostname + " -S ":U + mcPortNumber) NO-ERROR.
IF mhSocket:CONNECTED() THEN DO:
RUN log.p(mcLogFile, mhSocket:REMOTE-HOST + " on ":U + STRING(mhSocket:REMOTE-PORT) + " has successfully connected":U ).
mhSocket:SENSITIVE = TRUE.
mhSocket:SET-READ-RESPONSE-PROCEDURE("ReadProc":U).
END.
Thank you for your comments!
Jakl
I want to know if and how it is possible to send informations via https or sll? I use a normal socket client and it is possible to send it via http, but I can´t find any informations how to send it in a secure way. It is not enough to only change the port to 443, isn´t it?
Here some code example how we do it now (using 9.1D):
CREATE SOCKET mhSocket NO-ERROR.
IF ERROR-STATUS:ERROR OR (VALID-HANDLE(mhSocket) = FALSE) THEN DO:
RUN log.p(mcLogFile, "ERROR*** Socket creation failed":U ).
DELETE OBJECT mhSocket NO-ERROR.
polResult =FALSE.
RETURN.
END.
RUN log.p(mcLogFile, "Socket Created":U ).
mhSocket:CONNECT("-H ":U + mcHostname + " -S ":U + mcPortNumber) NO-ERROR.
IF mhSocket:CONNECTED() THEN DO:
RUN log.p(mcLogFile, mhSocket:REMOTE-HOST + " on ":U + STRING(mhSocket:REMOTE-PORT) + " has successfully connected":U ).
mhSocket:SENSITIVE = TRUE.
mhSocket:SET-READ-RESPONSE-PROCEDURE("ReadProc":U).
END.
Thank you for your comments!
Jakl