SpiecsEngine
 
Loading...
Searching...
No Matches

◆ HandleError()

void Spices::Net::TcpConnection::HandleError ( ) const
private

Handle Error event.

Definition at line 157 of file TcpConnection.cpp.

158 {
159 char optVal;
160 socklen_t optLen = sizeof(optVal);
161 int err = 0;
162 if (::getsockopt(m_Channel->Fd(), SOL_SOCKET, SO_ERROR, &optVal, &optLen) < 0)
163 {
164 err = WSAGetLastError();
165 }
166 else
167 {
168 err = optVal;
169 }
170
171 std::stringstream ss;
172 ss << "TcpConnection::HandleError SO_ERROR: " << err;
173
174 SPICES_CORE_ERROR(ss.str())
175 }
std::unique_ptr< Channel > m_Channel
TcpConnection channel.

Referenced by HandleRead().