Opened 13 years ago

Last modified 13 years ago

#3131 new Feature Requests

DCCP protocol support in Boost.Asio

Reported by: oakad@… Owned by: chris_kohlhoff
Milestone: Boost 1.40.0 Component: asio
Version: Boost 1.39.0 Severity: Problem
Keywords: Cc:

Description

DCCP is a connected datagram protocol, which can be seen to occupy the niche between UDP and TCP. Newer versions of glibc enable support of this protocol to some extent, so I decided, it may be handy to have support for it in Asio as well.

Considering that it only operates on connected sockets, I hacked up new basic_dccp_socket/dccp_socket_service classes, which are datagram in nature, but do not support unconnected operation.

One problem I haven't though about the way to address (hopefully, somebody will help me out with this) is concept of DCCP service codes. Each DCCP socket must be associated with one or several service codes. Information about the desired service codes must be communicated somehow down the pipe (either through an appropriate change to the "resolver" or by some other means).

If ignored, service code on sockets default to 0 and everything works fine, but it is not an intended approach to DCCP use.

Attachments (6)

dccp.hpp (2.6 KB ) - added by oakad@… 13 years ago.
DCCP protocol header
basic_dccp_socket.hpp (15.7 KB ) - added by oakad@… 13 years ago.
"connected-only" datagram socket
dccp_socket_service.hpp (8.9 KB ) - added by oakad@… 13 years ago.
"connected-only" datagram socket service
dccp-v1.tar.gz (7.2 KB ) - added by oakad@… 13 years ago.
async_dccp_echo_server.cpp (3.7 KB ) - added by oakad@… 13 years ago.
blocking_dccp_echo_client.cpp (1.8 KB ) - added by oakad@… 13 years ago.

Download all attachments as: .zip

Change History (8)

by oakad@…, 13 years ago

Attachment: dccp.hpp added

DCCP protocol header

by oakad@…, 13 years ago

Attachment: basic_dccp_socket.hpp added

"connected-only" datagram socket

by oakad@…, 13 years ago

Attachment: dccp_socket_service.hpp added

"connected-only" datagram socket service

comment:1 by oakad@…, 13 years ago

I decided that the best place to stash the service codes will be the actual DCCP endpoint. This however implies overloading of quite a few classes, as service codes must be set before every socket bind/connect operation. My current working version of the DCCP code is attached herein.

by oakad@…, 13 years ago

Attachment: dccp-v1.tar.gz added

comment:2 by anonymous, 13 years ago

I shall also add a couple of usage examples using the concept.

by oakad@…, 13 years ago

Attachment: async_dccp_echo_server.cpp added

by oakad@…, 13 years ago

Note: See TracTickets for help on using tickets.