Added documentation for Address and Protocol concepts.
This commit is contained in:
parent
83dffa3363
commit
d4b7057c4e
@ -31,7 +31,18 @@
|
||||
namespace asio {
|
||||
namespace ipv4 {
|
||||
|
||||
/// The address class implements IP version 4 style addresses.
|
||||
/// Implements IP version 4 style addresses.
|
||||
/**
|
||||
* The asio::ipv4::address class provides the ability to use and manipulate IP
|
||||
* version 4 addresses.
|
||||
*
|
||||
* @par Thread Safety:
|
||||
* @e Distinct @e objects: Safe.@n
|
||||
* @e Shared @e objects: Unsafe.
|
||||
*
|
||||
* @par Concepts:
|
||||
* Address.
|
||||
*/
|
||||
class address
|
||||
{
|
||||
public:
|
||||
@ -41,9 +52,12 @@ public:
|
||||
/// The default datagram-based protocol associated with the address type.
|
||||
typedef udp default_dgram_protocol;
|
||||
|
||||
/// The native types of the socket address. These types are dependent on the
|
||||
/// The native type of the address structure. This type is dependent on the
|
||||
/// underlying implementation of the socket layer.
|
||||
typedef detail::socket_addr_type native_address_type;
|
||||
|
||||
/// The native type for the size of the address structure. This type is
|
||||
/// dependent on the underlying implementation of the socket layer.
|
||||
typedef detail::socket_addr_len_type native_size_type;
|
||||
|
||||
/// Underlying types for internet addresses.
|
||||
|
@ -23,7 +23,17 @@
|
||||
namespace asio {
|
||||
namespace ipv4 {
|
||||
|
||||
/// The tcp class contains the flags necessary to use TCP sockets.
|
||||
/// Encapsulates the flags needed for TCP.
|
||||
/**
|
||||
* The asio::ipv4::tcp class contains the flags necessary to use TCP sockets.
|
||||
*
|
||||
* @par Thread Safety:
|
||||
* @e Distinct @e objects: Safe.@n
|
||||
* @e Shared @e objects: Safe.
|
||||
*
|
||||
* @par Concepts:
|
||||
* Protocol.
|
||||
*/
|
||||
class tcp
|
||||
{
|
||||
public:
|
||||
|
@ -22,7 +22,17 @@
|
||||
namespace asio {
|
||||
namespace ipv4 {
|
||||
|
||||
/// The udp class contains the flags necessary to use UDP sockets.
|
||||
/// Encapsulates the flags needed for UDP.
|
||||
/**
|
||||
* The asio::ipv4::udp class contains the flags necessary to use UDP sockets.
|
||||
*
|
||||
* @par Thread Safety:
|
||||
* @e Distinct @e objects: Safe.@n
|
||||
* @e Shared @e objects: Safe.
|
||||
*
|
||||
* @par Concepts:
|
||||
* Protocol.
|
||||
*/
|
||||
class udp
|
||||
{
|
||||
public:
|
||||
|
@ -23,10 +23,12 @@ EXTRA_DIST = \
|
||||
asio.css \
|
||||
asio_dox.txt \
|
||||
release_checklist.htm \
|
||||
concepts/Address.hpp \
|
||||
concepts/Async_Object.hpp \
|
||||
concepts/Async_Recv_Stream.hpp \
|
||||
concepts/Async_Send_Stream.hpp \
|
||||
concepts/Dispatcher.hpp \
|
||||
concepts/Protocol.hpp \
|
||||
concepts/Stream.hpp \
|
||||
concepts/Sync_Recv_Stream.hpp \
|
||||
concepts/Sync_Send_Stream.hpp \
|
||||
|
@ -97,10 +97,12 @@ documentation</a> for more information on how to use <tt>boost::bind</tt>.
|
||||
|
||||
<H2>Concepts</H2>
|
||||
|
||||
\li Address
|
||||
\li Async_Object
|
||||
\li Async_Recv_Stream
|
||||
\li Async_Send_Stream
|
||||
\li Dispatcher
|
||||
\li Protocol
|
||||
\li Stream
|
||||
\li Sync_Recv_Stream
|
||||
\li Sync_Send_Stream
|
||||
|
56
asio/src/doc/concepts/Address.hpp
Normal file
56
asio/src/doc/concepts/Address.hpp
Normal file
@ -0,0 +1,56 @@
|
||||
//
|
||||
// address.hpp
|
||||
// ~~~~~~~~~~~
|
||||
//
|
||||
// Copyright (c) 2003, 2004 Christopher M. Kohlhoff (chris@kohlhoff.com)
|
||||
//
|
||||
// Permission to use, copy, modify, distribute and sell this software and its
|
||||
// documentation for any purpose is hereby granted without fee, provided that
|
||||
// the above copyright notice appears in all copies and that both the copyright
|
||||
// notice and this permission notice appear in supporting documentation. This
|
||||
// software is provided "as is" without express or implied warranty, and with
|
||||
// no claim as to its suitability for any purpose.
|
||||
//
|
||||
|
||||
/// Address concept.
|
||||
/**
|
||||
* @par Implemented By:
|
||||
* asio::ipv4::address
|
||||
*/
|
||||
class Address
|
||||
{
|
||||
public:
|
||||
/// The default stream-based protocol associated with the address type. This
|
||||
/// typedef is not required if the address family does not support any stream
|
||||
/// protocols.
|
||||
typedef implementation_defined default_stream_protocol;
|
||||
|
||||
/// The default datagram-based protocol associated with the address type.
|
||||
/// This typedef is not required if the address family does not support any
|
||||
/// datagram protocols.
|
||||
typedef implementation_defined default_dgram_protocol;
|
||||
|
||||
/// The native type of the address structure. This type is dependent on the
|
||||
/// underlying implementation of the socket layer.
|
||||
typedef implementation_defined native_address_type;
|
||||
|
||||
/// The native type for the size of the address structure. This type is
|
||||
/// dependent on the underlying implementation of the socket layer.
|
||||
typedef implementation_defined native_size_type;
|
||||
|
||||
/// The address family.
|
||||
int family() const;
|
||||
|
||||
/// Get the underlying address in the native type. The returned object may be
|
||||
/// modified by the caller.
|
||||
native_address_type* native_address();
|
||||
|
||||
/// Get the underlying address in the native type.
|
||||
const native_address_type* native_address() const;
|
||||
|
||||
/// Get the underlying size of the address in the native type.
|
||||
native_size_type native_size() const;
|
||||
|
||||
/// Set the underlying size of the address in the native type.
|
||||
void native_size(native_size_type size);
|
||||
};
|
32
asio/src/doc/concepts/Protocol.hpp
Normal file
32
asio/src/doc/concepts/Protocol.hpp
Normal file
@ -0,0 +1,32 @@
|
||||
//
|
||||
// Protocol.hpp
|
||||
// ~~~~~~~~~~~~
|
||||
//
|
||||
// Copyright (c) 2003, 2004 Christopher M. Kohlhoff (chris@kohlhoff.com)
|
||||
//
|
||||
// Permission to use, copy, modify, distribute and sell this software and its
|
||||
// documentation for any purpose is hereby granted without fee, provided that
|
||||
// the above copyright notice appears in all copies and that both the copyright
|
||||
// notice and this permission notice appear in supporting documentation. This
|
||||
// software is provided "as is" without express or implied warranty, and with
|
||||
// no claim as to its suitability for any purpose.
|
||||
//
|
||||
|
||||
/// Protocol concept.
|
||||
/**
|
||||
* @par Implemented By:
|
||||
* asio::ipv4::tcp @n
|
||||
* asio::ipv4::udp
|
||||
*/
|
||||
class Protocol
|
||||
{
|
||||
public:
|
||||
/// Obtain an identifier for the type of the protocol.
|
||||
int type() const;
|
||||
|
||||
/// Obtain an identifier for the protocol.
|
||||
int protocol() const;
|
||||
|
||||
/// Obtain an identifier for the protocol family.
|
||||
int family() const;
|
||||
};
|
Loading…
Reference in New Issue
Block a user