MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / Initialize

Method Initialize

examples/ThirdPartyLibs/clsocket/src/SimpleSocket.cpp:138–161  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Initialize() - Initialize socket class ------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

136//
137//------------------------------------------------------------------------------
138bool CSimpleSocket::Initialize()
139{
140 errno = CSimpleSocket::SocketSuccess;
141
142#ifdef WIN32
143 //-------------------------------------------------------------------------
144 // Data structure containing general Windows Sockets Info
145 //-------------------------------------------------------------------------
146 memset(&m_hWSAData, 0, sizeof(m_hWSAData));
147 WSAStartup(MAKEWORD(2, 0), &m_hWSAData);
148#endif
149
150 //-------------------------------------------------------------------------
151 // Create the basic Socket Handle
152 //-------------------------------------------------------------------------
153 m_timer.Initialize();
154 m_timer.SetStartTime();
155 m_socket = socket(m_nSocketDomain, m_nSocketType, 0);
156 m_timer.SetEndTime();
157
158 TranslateSocketError();
159
160 return (IsSocketValid());
161}
162
163//------------------------------------------------------------------------------
164//

Callers 9

SendMethod · 0.45
ReceiveMethod · 0.45
ConnectTCPMethod · 0.45
ConnectUDPMethod · 0.45
ConnectRAWMethod · 0.45
BindMulticastMethod · 0.45
ListenMethod · 0.45
AcceptMethod · 0.45
SendMethod · 0.45

Calls 2

SetStartTimeMethod · 0.80
SetEndTimeMethod · 0.80

Tested by

no test coverage detected