MCPcopy Create free account
hub / github.com/audacity/audacity / OnSocketEvent

Method OnSocketEvent

src/AudacityApp.cpp:2416–2435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2414}
2415
2416void AudacityApp::OnSocketEvent(wxSocketEvent & evt)
2417{
2418 wxSocketBase *sock = evt.GetSocket();
2419
2420 if (evt.GetSocketEvent() == wxSOCKET_LOST)
2421 {
2422 sock->Destroy();
2423 return;
2424 }
2425
2426 // Read the length of the filename and bail if we have a short read
2427 wxChar name[PATH_MAX];
2428 sock->ReadMsg(&name, sizeof(name));
2429 if (!sock->Error())
2430 {
2431 // Add the filename to the queue. It will be opened by
2432 // the OnTimer() event when it is safe to do so.
2433 ofqueue.push_back(name);
2434 }
2435}
2436
2437#endif
2438

Callers

nothing calls this directly

Calls 3

DestroyMethod · 0.45
ErrorMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected