Skip to content

Instantly share code, notes, and snippets.

@koichik
Created Aug 10, 2011
Embed
What would you like to do?
tls image
cleartext cleartext
write() ↓ ↑ 'data'
+------------+ +---------------------------------------+
| | cleartext| _pending ↑ |
| |-------------| _pull() ↓ CleartextStream ↑ _push() |
| |pair |_puller() ↓ ↑ _pusher()|
| | +---------------------------------------+
| | clearIn ↓ ↑ clearOut
| | ssl+---------------------------------------+
| SecurePair |-------------| OpenSSL |
| | +---------------------------------------+
| | encOut ↓ ↑ encIn
| | +---------------------------------------+
| | encrypt|_pusher() ↓ ↑ _puller()|
| |-------------| _push() ↓ EncryptedStream ↑ _pull() |
| |pair | ↓ _pending |
+------------+ +---------------------------------------+
'data' ↓ ↑ 'data'
+----------------+ +----------------+
| pipe() | | pipe() |
+----------------+ +----------------+
write() ↓ ↑ write()
+---------------------------------------+
| net.Socket |
+---------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment