equal
deleted
inserted
replaced
150 } |
150 } |
151 else |
151 else |
152 { |
152 { |
153 int i = SO_MAX_MSG_SIZE; |
153 int i = SO_MAX_MSG_SIZE; |
154 // set socket options |
154 // set socket options |
155 BOOL keepAlive = FALSE; |
155 BOOL keepAlive = TRUE; |
156 setsockopt(m_socket, SOL_SOCKET, SO_KEEPALIVE, (const char*)&keepAlive, sizeof(BOOL)); |
156 setsockopt(m_socket, SOL_SOCKET, SO_KEEPALIVE, (const char*)&keepAlive, sizeof(BOOL)); |
157 |
157 |
158 struct linger l; |
158 struct linger l; |
159 l.l_onoff = 0; l.l_linger = 0; |
159 l.l_onoff = 0; l.l_linger = 0; |
160 setsockopt(m_socket, SOL_SOCKET, SO_LINGER, (const char*)&l, sizeof(l)); |
160 setsockopt(m_socket, SOL_SOCKET, SO_LINGER, (const char*)&l, sizeof(l)); |