| 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 #ifndef TALK_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_ | 11 #ifndef WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_ |
| 12 #define TALK_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_ | 12 #define WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_ |
| 13 #pragma once | 13 #pragma once |
| 14 | 14 |
| 15 #ifdef WIN32 | 15 #ifdef WIN32 |
| 16 #include <winsock2.h> | 16 #include <winsock2.h> |
| 17 typedef int socklen_t; | 17 typedef int socklen_t; |
| 18 typedef SOCKET NativeSocket; | 18 typedef SOCKET NativeSocket; |
| 19 #else | 19 #else |
| 20 #include <netinet/in.h> | 20 #include <netinet/in.h> |
| 21 #include <sys/select.h> | 21 #include <sys/select.h> |
| 22 #include <sys/socket.h> | 22 #include <sys/socket.h> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // The server socket. Accepts connections and generates DataSocket instances | 143 // The server socket. Accepts connections and generates DataSocket instances |
| 144 // for each new connection. | 144 // for each new connection. |
| 145 class ListeningSocket : public SocketBase { | 145 class ListeningSocket : public SocketBase { |
| 146 public: | 146 public: |
| 147 ListeningSocket() {} | 147 ListeningSocket() {} |
| 148 | 148 |
| 149 bool Listen(unsigned short port); | 149 bool Listen(unsigned short port); |
| 150 DataSocket* Accept() const; | 150 DataSocket* Accept() const; |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 #endif // TALK_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_ | 153 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_ |
| OLD | NEW |