latysheff / node-sctp

SCTP userspace sockets for Node.js
MIT License
59 stars 10 forks source link

unordered:true in socket.connect() #13

Open ibc opened 4 years ago

ibc commented 4 years ago

According to the README:

new net.Socket([options])

  • options [Object]

For SCTP socketss, available options are:

  • ppid [number] Payload protocol id (see below)
  • stream_id [number] SCTP stream id. Default: 0
  • unordered [boolean] Indicate unordered mode. Default: false
  • no_bundle [boolean] Disable chunk bundling. Default: false

Note: SCTP does not support a half-open state (like TCP) wherein one side may continue sending data while the other end is closed.

socket.connect(options[, connectListener])

  • options [Object]
  • connectListener [Function] Common parameter of socket.connect() methods. Will be added as a listener for the 'connect' event once.

I use SCTP over plain UDP so I create the sctp.Socket by calling socket.connect(). Can I pass unordered: false to options in connect()? The docs do not say that.

BTW may I know the status of unordered SCTP streams? AFAIK being "ordered" or "unordered" is not a property of a SCTP socket (SCTP association) but a per SCTP stream property. You can have N SCTP streams over the same SCP socket (association), being some of them ordered and some others unordered.