MCPcopy Create free account
hub / github.com/amule-project/amule / CreateSocket

Method CreateSocket

src/MuleUDPSocket.cpp:67–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66
67void CMuleUDPSocket::CreateSocket()
68{
69 wxCHECK_RET(!m_socket, "Socket already opened.");
70
71 m_socket = new CEncryptedDatagramSocket(m_addr, MULE_SOCKET_NOWAIT, m_proxy);
72 m_socket->SetClientData(this);
73 m_socket->Notify(true);
74
75 if (!m_socket->IsOk()) {
76 AddDebugLogLineC(logMuleUDP, "Failed to create valid " + m_name);
77 DestroySocket();
78 } else {
79 AddLogLineN(wxString("Created ") << m_name << " at port " << m_addr.Service());
80 }
81}
82
83
84void CMuleUDPSocket::DestroySocket()

Callers

nothing calls this directly

Calls 5

ServiceMethod · 0.80
wxStringClass · 0.70
SetClientDataMethod · 0.45
NotifyMethod · 0.45
IsOkMethod · 0.45

Tested by

no test coverage detected