| 2414 | } |
| 2415 | |
| 2416 | void 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 | |