SCTP::Socket
High-level SCTP socket implementation
This class provides a Socket-like interface for SCTP communication, supporting features like multi-streaming, multi-homing, and ordered/unordered delivery.
Example:
socket = SCTP::Socket.new
socket.connect("127.0.0.1", 3000)
socket.write("Hello, SCTP!")
response = socket.read_string(1024)
socket.close
Constructors
Instance methods
Add an additional local address to the socket (for multi-homing)
Bind the socket to multiple local addresses (multi-homing)
Example:
socket.bind(["192.168.1.100", "10.0.0.100"], 3000)
Connect to multiple remote addresses (multi-homing)
SCTP will use these addresses for redundancy and automatic failover.
Example:
socket.connect(["192.168.1.100", "10.0.0.100"], 3000)
finalize
SourceRead data with stream information
Remove a local address from the socket