| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include <stdio.h> | 11 #include <stdio.h> |
| 12 #include <stdlib.h> | 12 #include <stdlib.h> |
| 13 #include <string.h> | 13 #include <string.h> |
| 14 | 14 |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "webrtc/examples/peerconnection/server/data_socket.h" | 17 #include "webrtc/examples/peerconnection/server/data_socket.h" |
| 18 #include "webrtc/examples/peerconnection/server/peer_channel.h" | 18 #include "webrtc/examples/peerconnection/server/peer_channel.h" |
| 19 #include "webrtc/examples/peerconnection/server/utils.h" | 19 #include "webrtc/examples/peerconnection/server/utils.h" |
| 20 #include "webrtc/tools/simple_command_line_parser.h" | 20 #include "webrtc/rtc_tools/simple_command_line_parser.h" |
| 21 | 21 |
| 22 static const size_t kMaxConnections = (FD_SETSIZE - 2); | 22 static const size_t kMaxConnections = (FD_SETSIZE - 2); |
| 23 | 23 |
| 24 void HandleBrowserRequest(DataSocket* ds, bool* quit) { | 24 void HandleBrowserRequest(DataSocket* ds, bool* quit) { |
| 25 assert(ds && ds->valid()); | 25 assert(ds && ds->valid()); |
| 26 assert(quit); | 26 assert(quit); |
| 27 | 27 |
| 28 const std::string& path = ds->request_path(); | 28 const std::string& path = ds->request_path(); |
| 29 | 29 |
| 30 *quit = (path.compare("/quit") == 0); | 30 *quit = (path.compare("/quit") == 0); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 } | 171 } |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 | 174 |
| 175 for (SocketArray::iterator i = sockets.begin(); i != sockets.end(); ++i) | 175 for (SocketArray::iterator i = sockets.begin(); i != sockets.end(); ++i) |
| 176 delete (*i); | 176 delete (*i); |
| 177 sockets.clear(); | 177 sockets.clear(); |
| 178 | 178 |
| 179 return 0; | 179 return 0; |
| 180 } | 180 } |
| OLD | NEW |