Mike Haben
2012-06-08 16:32:26 UTC
There was some discussion on this list a couple of years ago (see
http://comments.gmane.org/gmane.comp.lib.boost.asio.user/3964) about
adding SCTP support to the ASIO library. I've had another look at this
and, I must admit, not got much further than coming to understand the
magnitude of the problem, but for what it's worth I've modified Hal
Finkel's code (thanks Hal) to match the current Asio scheme of .hpp
"interface" and .ipp "implementation" files and added a couple of socket
options that I needed - repository at
https://github.com/CompleteAndUtterGit/boost_asio_sctp
contains this code, plus a very simple server application that
illustrates what already works and what remains to sort out. As Hal
noted before, the first stumbling block seems to be how to create a
variant of async_read that passes back two metadata items from the SCTP
packet header (stream number and payload protocol ID) as well as the
number of bytes in the packet and the error code.
On a slight tangent, I've also had a go at getting the simple-server
code going on Windows, using Bruce Cran's SctpDrv library. Even less
success so far - I've established that it needs to be built with
win_iocp disabled in order to avoid an immediate run-time error in
async_accept, but now I'm finding that async_accept does not respond to
incoming connections (OnAccept never gets called). Something for
another day...
So, is anyone else interested in SCTP?
Mike Haben
http://comments.gmane.org/gmane.comp.lib.boost.asio.user/3964) about
adding SCTP support to the ASIO library. I've had another look at this
and, I must admit, not got much further than coming to understand the
magnitude of the problem, but for what it's worth I've modified Hal
Finkel's code (thanks Hal) to match the current Asio scheme of .hpp
"interface" and .ipp "implementation" files and added a couple of socket
options that I needed - repository at
https://github.com/CompleteAndUtterGit/boost_asio_sctp
contains this code, plus a very simple server application that
illustrates what already works and what remains to sort out. As Hal
noted before, the first stumbling block seems to be how to create a
variant of async_read that passes back two metadata items from the SCTP
packet header (stream number and payload protocol ID) as well as the
number of bytes in the packet and the error code.
On a slight tangent, I've also had a go at getting the simple-server
code going on Windows, using Bruce Cran's SctpDrv library. Even less
success so far - I've established that it needs to be built with
win_iocp disabled in order to avoid an immediate run-time error in
async_accept, but now I'm finding that async_accept does not respond to
incoming connections (OnAccept never gets called). Something for
another day...
So, is anyone else interested in SCTP?
Mike Haben