示例#1
0
void
ssl_socket::close(
  void
  )
{
  close_impl();
}
示例#2
0
    void close(Sink& snk, BOOST_IOS::openmode m)
    {
        try {
            // Close zlib compressor.
            base_type::close(snk, m);

            if (m == BOOST_IOS::out) {
                if (flags_ & f_header_done) {

                    // Write final fields of gzip file format.
                    write_long(this->crc(), snk);
                    write_long(this->total_in(), snk);
                }
            }
        } catch(...) {
            close_impl();
            throw;
        }
        close_impl();
    }
示例#3
0
static lcb_socket_t
socket_impl(lcb_io_opt_t iops, int domain, int type, int protocol)
{
    lcb_socket_t sock;
#ifdef _WIN32
    sock = (lcb_socket_t)WSASocket(domain, type, protocol, NULL, 0, 0);
#else
    sock = socket(domain, type, protocol);
#endif
    if (sock == INVALID_SOCKET) {
        LCB_IOPS_ERRNO(iops) = errno;
    } else {
        if (make_socket_nonblocking(sock) != 0) {
#ifdef _WIN32
            LCB_IOPS_ERRNO(iops) = get_wserr(sock);
#else
            LCB_IOPS_ERRNO(iops) = errno;
#endif
            close_impl(iops, sock);
            sock = INVALID_SOCKET;
        }
    }
    return sock;
}
示例#4
0
bool c_XMLReader::t_close() {
  close_impl();
  return true;
}
示例#5
0
c_XMLReader::~c_XMLReader() {
  close_impl();
}
示例#6
0
bool c_XMLReader::t_close() {
  INSTANCE_METHOD_INJECTION_BUILTIN(XMLReader, XMLReader::close);
  close_impl();
  return true;
}