In this line options.streamId is accessed, but it doesn't exist. object.stream_id (local variable streamId) would exist, but the way I see it, it would be wrong as well. PPID means Payload Protocol Identifier and should specify the type of the payload in the packet. For example WebRTC uses 51 for Strings and 53 for binary data.
An easy solution would be to require a options.ppid to be given to the Association.send() method. The Socket class already has the Socket.ppid property, which it could pass down to the association.
Yet, it raises the question, if one should be capable of specifying the ppid value on a per packet basis. Then the Duplex API is not ideal.
In this line
options.streamIdis accessed, but it doesn't exist.object.stream_id(local variable streamId) would exist, but the way I see it, it would be wrong as well. PPID means Payload Protocol Identifier and should specify the type of the payload in the packet. For example WebRTC uses 51 for Strings and 53 for binary data.An easy solution would be to require a
options.ppidto be given to theAssociation.send()method. TheSocketclass already has theSocket.ppidproperty, which it could pass down to the association.Yet, it raises the question, if one should be capable of specifying the
ppidvalue on a per packet basis. Then theDuplexAPI is not ideal.