void TSocket::close() {
? if (socket_ != -1) {
創(chuàng)新互聯(lián)公司專業(yè)為企業(yè)提供禹城網(wǎng)站建設(shè)、禹城做網(wǎng)站、禹城網(wǎng)站設(shè)計(jì)、禹城網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計(jì)與制作、禹城企業(yè)網(wǎng)站模板建站服務(wù),十余年禹城做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。
#ifdef _WIN32
????? shutdown(socket_, SD_BOTH);
????? ::closesocket(socket_);
#else
????? shutdown(socket_, SHUT_RDWR);
????? ::close(socket_);
#endif
? }
? socket_ = -1;
}
客戶端連接的套接字在這里進(jìn)行了關(guān)閉
/**
?* Wraps a transport into a buffered one.
?*
?*/
class TBufferedTransportFactory : public TTransportFactory {
?public:
? TBufferedTransportFactory() {}
? virtual ~TBufferedTransportFactory() {}
? /**
?? * Wraps the transport into a buffered one.
?? */
? virtual boost::shared_ptr
??? return boost::shared_ptr
? }
};