14 Commits

Author SHA1 Message Date
Hans Svensson
0436704327 Report decrypt error upstream (instead of crashing) 2018-05-08 16:00:10 +02:00
Hans Svensson
738b123164 Report send result to caller 2018-05-08 16:00:10 +02:00
Hans Svensson
a484d14c41 setopts is in inet, not gen_tcp 2018-04-25 09:37:00 +02:00
Hans Svensson
9639e08a4f Don't forget to close the gen_server upon tcp_closed 2018-04-18 10:15:46 +02:00
Hans Svensson
fc510c07a1 Handle errors in start_link (tcp_closed) 2018-04-17 09:00:22 +02:00
Hans Svensson
8f3aff4d8b Support {active, true} and {active, once} in gen_tcp-wrapper
In the implemented TCP-wrapper (enoise_connection) we now properly support {active, true}
and {active, once} and switching between them (previously no switching was supported).
2018-03-13 23:22:42 +01:00
Hans Svensson
2f220d599c Introduce generic enoise:handshake and implement tcp in terms of it 2018-03-09 10:26:49 +01:00
Hans Svensson
8d47669d68 More documentation and some cleanup 2018-03-08 12:07:00 +01:00
Hans Svensson
14fe5c7e8e Implement enoise_connection:controlling_process/2 2018-03-08 11:19:46 +01:00
Hans Svensson
955e5c2f32 Handle recv(NoiseSock, 0) correctly
This is a bit subtle since the underlying data is inherently chunked into Noise messages. Need to keep the right data around.
2018-03-07 14:28:56 +01:00
Hans Svensson
02fcf8a86c Don’t do arithmetics with infinity (the atom) 2018-03-07 14:27:46 +01:00
Hans Svensson
4ebb8c8ec9 Make termination reason normal for tcp_closed
To avoid lots of error reports, this is a normal case after all…
2018-03-07 14:27:19 +01:00
Hans Svensson
4791d15f2e Fix typo bug 2018-03-07 11:23:21 +01:00
Hans Svensson
d81f1eb32e Introduce enoise_connection
This will put the control into a (gen_server) process that wraps the functionality in much the same way as ssl does for gen_tcp, etc.

Some features are still missing (like setopts)
2018-03-06 16:19:25 +01:00