https://github.com/igolaizola/resumetls
Resumable TLS client connection without doing any additional handshake operations, implemented in golang
https://github.com/igolaizola/resumetls
go golang resumable serializable tls
Last synced: 11 months ago
JSON representation
Resumable TLS client connection without doing any additional handshake operations, implemented in golang
- Host: GitHub
- URL: https://github.com/igolaizola/resumetls
- Owner: igolaizola
- License: mit
- Created: 2018-08-23T08:37:22.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-08-29T14:47:52.000Z (almost 2 years ago)
- Last Synced: 2024-11-26T23:34:55.849Z (over 1 year ago)
- Topics: go, golang, resumable, serializable, tls
- Language: Go
- Size: 30.3 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# resumetls
Resumable TLS connection without doing any additional handshake operations, implemented in golang
## Details
- `Client`, `Server` stores some handshake data and TLS inner sequential numbers
- `State` object needed for resume a connection is public and serializable
## Usage
```
// Start a new TLS client
cli := resumetls.Client(conn, &tls.Config{}, nil)
cli.Handshake()
// Perform multiple cli.Read and cli.Write here
...
// Get State whenever we want to pause the client
state := cli.State()
// Resume client using previously obtained state
cli2 := resumetls.Client(conn, &tls.Config{}, state)
// Continue with cli2.Read and cli2.Write here
...
```