All Manuals > LispWorks® User Guide and Reference Manual > 32 The COMM Package

switch-open-tcp-stream-with-ssl-to-java Function

Summary

Make open-tcp-stream use Java sockets for SSL streams.

Package

comm

Signature

switch-open-tcp-stream-with-ssl-to-java &optional on

Arguments
on
A generalized boolean.
Description

The function switch-open-tcp-stream-with-ssl-to-java makes open-tcp-stream use Java sockets for SSL streams.

The default state corresponds to on being nil, except on Android when switch-open-tcp-stream-with-ssl-to-java is called before delivering to Android (if the module "comm" was loaded) to switch the state to t. The default value of on is t.

Once the state switches to t, when open-tcp-stream is called with ssl-ctx non-nil, it uses a Java socket instead of ordinary socket to implement the stream. The resulting stream has some limitations, in particular cl:listen does not work reliably on it. See 25.9 Socket streams with Java sockets and SSL on Android for details.

Notes
  1. The Java virtual machine (JVM) must be running for open-tcp-stream to work after it is switched to use Java sockets. On Android the JVM always runs, on other architectures it needs to have been started by init-java-interface.
  2. open-tcp-stream-using-java can be used to make plain (non-SSL) socket streams with Java sockets, if that seems to be useful.
See also

open-tcp-stream
open-tcp-stream-using-java
25.9 Socket streams with Java sockets and SSL on Android
25 TCP and UDP socket communication and SSL


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:26