Menu

[r78]: / trunk / libs / network / doc / message.qbk  Maximize  Restore  History

Download this file

41 lines (29 with data), 1.3 kB

[/
  (C) Copyright 2008 Glyn Matthews.
  Distributed under the Boost Software License, Version 1.0.
  (See accompanying file LICENSE_1_0.txt or copy at
  http://www.boost.org/LICENSE_1_0.txt).
]


[section:template The Message Template]
The initial concept behind the __cnl__ is the message template. The message template represents common message type used by protocol implementations.  It can therefore be specialized to support different data structures or different string types.

[note Add more detailed information about the message template.]

The message template interface is presented below:

 namespace boost { namespace network {
 template <class Tag>
 class basic_message {
 public:
     typedef implementation_defined headers_container_type;
     typedef implementation_defined string_type;

     basic_message(const basic_message &);
     basic_message &operator = (const basic_message &);
     void swap(basic_message &);

     headers_container_type & headers() const;
     string_type & body() const;
     string_type & source() const;
     string_type & destination() const;
 };

 typedef basic_message<tags::default_> message; // default message type
 }}

[h4 Concepts]
=basic_message= supports the CopyConstructible, Assignable and Swappable concepts, as do all its derivates.


[endsect]