Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JNI: add example threaded client/server applications (JNI only) #212

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

cconlon
Copy link
Member

@cconlon cconlon commented Jul 19, 2024

This PR adds two new JNI-level (not JSSE) examples, a threaded client and server example. The client does session resumption when possible and maintains an application-wide client session cache to hold native WOLFSSL_SESSION pointers.

  • examples/SimpleThreadedClient.java - makes concurrent client connections to a server located at localhost:11111. Default number of client threads is 5, but can be changed using the -n <num_connections> command line argument. This example implements a simple application-wide Java client cache where native WOLFSSL_SESSION pointers are stored and used for session resumption where possible. See code comments for further explanation.
  • examples/SimpleThreadedServer.java - starts at localhost:11111 and waits for client connections. When a client connection is received, it is handled in a separate thread.

ZD 17211

@dgarske dgarske merged commit 4e70b68 into wolfSSL:master Aug 1, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants