Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of Thrift Resource cleanup Code

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Void TSocket::close () {

If (socket_! =-1) {

# ifdef _ WIN32

Shutdown (socket_, SD_BOTH)

:: closesocket (socket_)

# else

Shutdown (socket_, SHUT_RDWR)

:: close (socket_)

# endif

}

Socket_ =-1

}

The socket for the client connection is closed here

/ * *

* 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 getTransport (boost::shared_ptr trans) {

Return boost::shared_ptr (new TBufferedTransport (trans))

}

}

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report