SpiecsEngine
 
Loading...
Searching...
No Matches

◆ Send()

void Spices::Net::Socket::Send ( const std::string & data) const

Send data to server.

Parameters
[in]dataSend data.
Note
Usually not call Send directly, but use Buffer::WriteFd.

Definition at line 106 of file Socket.cpp.

107 {
109
110 if (::send(m_SocketFd, data.c_str(), data.size(), 0) < 0)
111 {
112 std::stringstream ss;
113 ss << "Socket::Send error, socket fd: " << m_SocketFd << " Error: " << WSAGetLastError();
114
115 SPICES_CORE_CRITICAL(ss.str())
116 }
117 }
#define SPICES_PROFILE_ZONE
SOCKET m_SocketFd
This socket fd.
Definition Socket.h:142