@@ -44,49 +44,65 @@ namespace boost { namespace network {
44
44
45
45
typedef Tag tag;
46
46
47
- typedef typename headers_container<tag >::type headers_container_type;
48
- typedef typename string<tag >::type string_type;
47
+ typedef typename headers_container<Tag >::type headers_container_type;
48
+ typedef typename string<Tag >::type string_type;
49
49
50
50
basic_message ()
51
51
: _headers(), _body(), _source(), _destination()
52
- { };
52
+ { }
53
53
54
54
basic_message (const basic_message & other)
55
55
: _headers(other._headers), _body(other._body), _source(other._source), _destination(other._destination)
56
- { };
56
+ { }
57
57
58
- basic_message & operator =(basic_message<tag > rhs) {
58
+ basic_message & operator =(basic_message<Tag > rhs) {
59
59
rhs.swap (*this );
60
60
return *this ;
61
- };
61
+ }
62
62
63
- void swap (basic_message<tag > & other) {
63
+ void swap (basic_message<Tag > & other) {
64
64
other._headers .swap (_headers);
65
65
other._body .swap (_body);
66
66
other._source .swap (_source);
67
67
other._destination .swap (_destination);
68
- };
68
+ }
69
69
70
70
headers_container_type & headers () {
71
71
return _headers;
72
- };
72
+ }
73
+
74
+ headers_container_type headers () const {
75
+ return _headers;
76
+ }
73
77
74
78
string_type & body () {
75
79
return _body;
76
- };
80
+ }
81
+
82
+ string_type body () const {
83
+ return _body;
84
+ }
77
85
78
86
string_type & source () {
79
87
return _source;
80
- };
88
+ }
89
+
90
+ string_type source () const {
91
+ return _source;
92
+ }
81
93
82
94
string_type & destination () {
83
95
return _destination;
84
- };
96
+ }
97
+
98
+ string_type destination () const {
99
+ return _destination;
100
+ }
85
101
86
102
private:
87
103
88
- friend struct detail ::directive_base<tag > ;
89
- friend struct detail ::wrapper_base<tag > ;
104
+ friend struct detail ::directive_base<Tag > ;
105
+ friend struct detail ::wrapper_base<Tag > ;
90
106
91
107
headers_container_type _headers;
92
108
string_type _body;
0 commit comments