MCPcopy Create free account
hub / github.com/chen3feng/toft / StreamSocketTest

Method StreamSocketTest

system/net/socket_test.cpp:114–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112{
113protected:
114 StreamSocketTest()
115 {
116 EXPECT_TRUE(m_listener.Create(AF_INET, SOCK_STREAM));
117 EXPECT_TRUE(m_listener.SetReuseAddress());
118 SocketAddressInet address("127.0.0.1:0");
119 EXPECT_TRUE(m_listener.Bind(address));
120 EXPECT_TRUE(m_listener.GetLocalAddress(&m_address));
121 EXPECT_TRUE(m_listener.Listen());
122 m_thread.Start(std::bind(&StreamSocketTest::IoThread, this));
123 }
124 ~StreamSocketTest()
125 {
126 m_thread.Join();

Callers

nothing calls this directly

Calls 4

GetLocalAddressMethod · 0.80
CreateMethod · 0.45
BindMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected