| 30 | } |
| 31 | |
| 32 | bool HttpStreamServer::connect() { |
| 33 | // If already listening, return true |
| 34 | if (isConnected()) { |
| 35 | return true; |
| 36 | } |
| 37 | |
| 38 | // Start listening |
| 39 | if (!mNativeServer->start()) { |
| 40 | return false; |
| 41 | } |
| 42 | |
| 43 | // Mark connection as established in base class |
| 44 | mConnection.onConnected(); |
| 45 | |
| 46 | return true; |
| 47 | } |
| 48 | |
| 49 | void HttpStreamServer::disconnect() { |
| 50 | if (mNativeServer) { |
nothing calls this directly
no test coverage detected