class

SCTP::Server

Inherits Reference < Object

High-level SCTP server implementation (similar to TCPServer)

Example:

server = SCTP::Server.new("127.0.0.1", 3000)
loop do
  client = server.accept
  spawn do
    # Handle client
    client.close
  end
end

Constructors

new(host : String, port : Int32, streams : Int32 = 1, backlog : Int32 = 128)

Create and bind a new SCTP server

Source
new(port : Int32, streams : Int32 = 1, backlog : Int32 = 128)

Create server on all interfaces

Source

Instance methods

accept

Accept an incoming connection

Source
accept

Accept with a block

Source
close

Close the server

Source
closed?

Check if server is closed

Source
local_address

Get local address

Source