-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
Issue when using DTLS #344
Comments
@Lazarus404 DTLS is primarily a cryptographic protocol for UDP, while Ranch provides a mechanism based on TCP. It is not strange that it does not work. Why are you trying to use DTLS with Ranch? |
because the documentation suggests that it works (protocol: :tcp or :dtls) and because I need DTLS support in my app. Support for DTLS would mean I don't have to build my own acceptor dispatcher etc. The handling of DTLS packets isn't dissimilar to TCP / TLS. If Ranch doesn't support DTLS, then I'll have to build my own acceptor dispatcher and I may as well not use Ranch at all. |
I see that the documentation does indeed allow DTLS to be specified, but it seems to me that this is probably just because the SSL library allows it to be specified. I don't think Ranch can do what you want, since Ranch is based on TCP. A side note ... I have my own Erlang implementation of the DTLS protocol, but if you want to use DTLS with TURN or WebRTC, I suggest you fork the OTP ssl library or implement a binding such as OpenSSL. |
Okay, thanks. |
It has not been tested with DTLS and likely does not work with it. If it's impossible to make Ranch able to do DTLS without significant changes then we should perhaps drop the atom from the documentation. |
I do have an app that uses DTLS alongside TLS that handles packet fragmentation. However, I've not got the time to work this into Ranch at the moment. Maybe in December I could find some time? |
Hey guys,
I'm using Ranch successfully for both TCP and TLS in an Elixir project. However, if I pass
{:protocol, :dtls}
to the opts for DTLS, then the connection fails with:I'm running on a Mac, hence the
POSIX error
(which I'm sure you can reason yourself). However, I can't seem to find what might be wrong with my code to cause this crash. I've tried setting no opts except the:protocol
, and it still errors the same. Do I need to set something else to make this work?Thanks
The text was updated successfully, but these errors were encountered: