github.com/spider-gazelle/crystal-dtls

DTLS support for crystal lang

2 stars
2 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  dtls:
    github: spider-gazelle/crystal-dtls
    version: ~> 0.9.4

Then run:

shards install

shard.yml

Crystal
>= 1.0.0

Dependencies

Development Dependencies

  • ameba*github: veelenga/amebadev

README

Crystal Lang DTLS Support

CI

Communicate over UDP securely with DTLS

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      dtls:
        github: spider-gazelle/crystal-dtls
  2. 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