Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::asio::buffer_copy

The boost::asio::buffer_copy function is used to copy bytes from a source buffer (or buffer sequence) to a target buffer (or buffer sequence). More...

Functions

std::size_t boost::asio::buffer_copy (const mutable_buffer &target, const const_buffer &source)
 Copies bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffer &target, const const_buffers_1 &source)
 Copies bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffer &target, const mutable_buffer &source)
 Copies bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffer &target, const mutable_buffers_1 &source)
 Copies bytes from a source buffer to a target buffer. More...
 
template<typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy (const mutable_buffer &target, const ConstBufferSequence &source)
 Copies bytes from a source buffer sequence to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffers_1 &target, const const_buffer &source)
 Copies bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffers_1 &target, const const_buffers_1 &source)
 Copies bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffers_1 &target, const mutable_buffer &source)
 Copies bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffers_1 &target, const mutable_buffers_1 &source)
 Copies bytes from a source buffer to a target buffer. More...
 
template<typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy (const mutable_buffers_1 &target, const ConstBufferSequence &source)
 Copies bytes from a source buffer sequence to a target buffer. More...
 
template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy (const MutableBufferSequence &target, const const_buffer &source)
 Copies bytes from a source buffer to a target buffer sequence. More...
 
template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy (const MutableBufferSequence &target, const const_buffers_1 &source)
 Copies bytes from a source buffer to a target buffer sequence. More...
 
template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy (const MutableBufferSequence &target, const mutable_buffer &source)
 Copies bytes from a source buffer to a target buffer sequence. More...
 
template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy (const MutableBufferSequence &target, const mutable_buffers_1 &source)
 Copies bytes from a source buffer to a target buffer sequence. More...
 
template<typename MutableBufferSequence , typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy (const MutableBufferSequence &target, const ConstBufferSequence &source)
 Copies bytes from a source buffer sequence to a target buffer sequence. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffer &target, const const_buffer &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffer &target, const const_buffers_1 &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffer &target, const mutable_buffer &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffer &target, const mutable_buffers_1 &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer. More...
 
template<typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy (const mutable_buffer &target, const ConstBufferSequence &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer sequence to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffers_1 &target, const const_buffer &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffers_1 &target, const const_buffers_1 &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffers_1 &target, const mutable_buffer &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer. More...
 
std::size_t boost::asio::buffer_copy (const mutable_buffers_1 &target, const mutable_buffers_1 &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer. More...
 
template<typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy (const mutable_buffers_1 &target, const ConstBufferSequence &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer sequence to a target buffer. More...
 
template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy (const MutableBufferSequence &target, const const_buffer &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer sequence. More...
 
template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy (const MutableBufferSequence &target, const const_buffers_1 &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer sequence. More...
 
template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy (const MutableBufferSequence &target, const mutable_buffer &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer sequence. More...
 
template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy (const MutableBufferSequence &target, const mutable_buffers_1 &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer to a target buffer sequence. More...
 
template<typename MutableBufferSequence , typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy (const MutableBufferSequence &target, const ConstBufferSequence &source, std::size_t max_bytes_to_copy)
 Copies a limited number of bytes from a source buffer sequence to a target buffer sequence. More...
 

Detailed Description

The boost::asio::buffer_copy function is used to copy bytes from a source buffer (or buffer sequence) to a target buffer (or buffer sequence).

The buffer_copy function is available in two forms:

Both forms return the number of bytes actually copied. The number of bytes copied is the lesser of:

This prevents buffer overflow, regardless of the buffer sizes used in the copy operation.

Note that boost::asio::buffer_copy is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

Function Documentation

std::size_t boost::asio::buffer_copy ( const mutable_buffer &  target,
const const_buffer &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_size(), and boost::n.

Referenced by boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffer &  target,
const const_buffers_1 &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffer &  target,
const mutable_buffer &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffer &  target,
const mutable_buffers_1 &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy().

template<typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy ( const mutable_buffer &  target,
const ConstBufferSequence &  source 
)

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer sequence to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy(), and boost::asio::buffer_size().

std::size_t boost::asio::buffer_copy ( const mutable_buffers_1 &  target,
const const_buffer &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffers_1 &  target,
const const_buffers_1 &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffers_1 &  target,
const mutable_buffer &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffers_1 &  target,
const mutable_buffers_1 &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy().

template<typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy ( const mutable_buffers_1 &  target,
const ConstBufferSequence &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer sequence to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy().

template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy ( const MutableBufferSequence &  target,
const const_buffer &  source 
)

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer sequence.

Parameters
targetA modifiable buffer sequence representing the memory regions to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy(), and boost::asio::buffer_size().

template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy ( const MutableBufferSequence &  target,
const const_buffers_1 &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer sequence.

Parameters
targetA modifiable buffer sequence representing the memory regions to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy().

template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy ( const MutableBufferSequence &  target,
const mutable_buffer &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer sequence.

Parameters
targetA modifiable buffer sequence representing the memory regions to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy().

template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy ( const MutableBufferSequence &  target,
const mutable_buffers_1 &  source 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer to a target buffer sequence.

Parameters
targetA modifiable buffer sequence representing the memory regions to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy().

template<typename MutableBufferSequence , typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy ( const MutableBufferSequence &  target,
const ConstBufferSequence &  source 
)

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies bytes from a source buffer sequence to a target buffer sequence.

Parameters
targetA modifiable buffer sequence representing the memory regions to which the bytes will be copied.
sourceA non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy(), and boost::asio::buffer_size().

std::size_t boost::asio::buffer_copy ( const mutable_buffer &  target,
const const_buffer &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffer &  target,
const const_buffers_1 &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffer &  target,
const mutable_buffer &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffer &  target,
const mutable_buffers_1 &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

template<typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy ( const mutable_buffer &  target,
const ConstBufferSequence &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer sequence to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffers_1 &  target,
const const_buffer &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffers_1 &  target,
const const_buffers_1 &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffers_1 &  target,
const mutable_buffer &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

std::size_t boost::asio::buffer_copy ( const mutable_buffers_1 &  target,
const mutable_buffers_1 &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

template<typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy ( const mutable_buffers_1 &  target,
const ConstBufferSequence &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer sequence to a target buffer.

Parameters
targetA modifiable buffer representing the memory region to which the bytes will be copied.
sourceA non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy ( const MutableBufferSequence &  target,
const const_buffer &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer sequence.

Parameters
targetA modifiable buffer sequence representing the memory regions to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy ( const MutableBufferSequence &  target,
const const_buffers_1 &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer sequence.

Parameters
targetA modifiable buffer sequence representing the memory regions to which the bytes will be copied.
sourceA non-modifiable buffer representing the memory region from which the bytes will be copied.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy ( const MutableBufferSequence &  target,
const mutable_buffer &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer sequence.

Parameters
targetA modifiable buffer sequence representing the memory regions to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

template<typename MutableBufferSequence >
std::size_t boost::asio::buffer_copy ( const MutableBufferSequence &  target,
const mutable_buffers_1 &  source,
std::size_t  max_bytes_to_copy 
)
inline

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer to a target buffer sequence.

Parameters
targetA modifiable buffer sequence representing the memory regions to which the bytes will be copied.
sourceA modifiable buffer representing the memory region from which the bytes will be copied. The contents of the source buffer will not be modified.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer(), and boost::asio::buffer_copy().

template<typename MutableBufferSequence , typename ConstBufferSequence >
std::size_t boost::asio::buffer_copy ( const MutableBufferSequence &  target,
const ConstBufferSequence &  source,
std::size_t  max_bytes_to_copy 
)

#include <boost_1_57_0/boost/asio/buffer.hpp>

Copies a limited number of bytes from a source buffer sequence to a target buffer sequence.

Parameters
targetA modifiable buffer sequence representing the memory regions to which the bytes will be copied.
sourceA non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.
max_bytes_to_copyThe maximum number of bytes to be copied.
Returns
The number of bytes copied.
Note
The number of bytes copied is the lesser of:
  • buffer_size(target)
  • buffer_size(source)
  • max_bytes_to_copy

This function is implemented in terms of memcpy, and consequently it cannot be used to copy between overlapping memory regions.

References boost::asio::buffer_copy(), and boost::asio::buffer_size().