The doc says:
Status sf::TcpSocket::send(const void* data, std::size_t size)
Send raw data to the remote peer.
This function will fail if the socket is not connected.
Parameters
data Pointer to the sequence of bytes to send
size Number of bytes to send
Returns
Status code
It will simply send everything in one go.
If still not convinced, look at the implementation ;)
Socket::Status TcpSocket::send(const void* data, std::size_t size)
{
// Check the parameters
if (!data || (size == 0))
{
err() << "Cannot send data over the network (no data to send)" << std::endl;
return Error;
}
// Loop until every byte has been sent
int sent = 0;
int sizeToSend = static_cast<int>(size);
for (int length = 0; length < sizeToSend; length += sent)
{
// Send a chunk of data
sent = ::send(getHandle(), static_cast<const char*>(data) + length, sizeToSend - length, flags);
// Check for errors
if (sent < 0)
return priv::SocketImpl::getErrorStatus();
}
return Done;
}