Test that FLAG_FIN is set if the read callback is NULL.

This commit is contained in:
Jim Morrison
2012-02-20 13:12:13 -08:00
parent 2edceb1fb1
commit 6e7025b9f5
6 changed files with 43 additions and 3 deletions

View File

@@ -138,6 +138,8 @@ int communicate(const std::string& host, uint16_t port,
std::cerr << "Could not connect to the host" << std::endl;
return -1;
}
make_non_block(fd);
set_tcp_nodelay(fd);
SSL_CTX *ssl_ctx;
ssl_ctx = SSL_CTX_new(SSLv23_client_method());
if(!ssl_ctx) {
@@ -153,8 +155,6 @@ int communicate(const std::string& host, uint16_t port,
if(ssl_handshake(ssl, fd) == -1) {
return -1;
}
make_non_block(fd);
set_tcp_nodelay(fd);
Spdylay sc(fd, ssl, callbacks);
nfds_t npollfds = 1;