Crystal Lang DTLS Support
Communicate over UDP securely with DTLS
Installation
-
Add the dependency to your
shard.yml
:dependencies: dtls: github: spider-gazelle/crystal-dtls
-
Run
shards install
Usage
require "dtls"
host = UDPSocket.new
host.connect "dtls.server", 4444
# Wrap the UDP connection
socket = DTLS::Socket::Client.new(host)
# Communicate over DTLS
socket << "request"
socket.flush
response = socket.gets
socket.close