OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 virtual int RecvFrom(void* buffer, | 48 virtual int RecvFrom(void* buffer, |
49 size_t length, | 49 size_t length, |
50 SocketAddress* out_addr, | 50 SocketAddress* out_addr, |
51 int64_t* timestamp); | 51 int64_t* timestamp); |
52 virtual int Listen(int backlog); | 52 virtual int Listen(int backlog); |
53 virtual Win32Socket *Accept(SocketAddress *out_addr); | 53 virtual Win32Socket *Accept(SocketAddress *out_addr); |
54 virtual int Close(); | 54 virtual int Close(); |
55 virtual int GetError() const; | 55 virtual int GetError() const; |
56 virtual void SetError(int error); | 56 virtual void SetError(int error); |
57 virtual ConnState GetState() const; | 57 virtual ConnState GetState() const; |
58 virtual int EstimateMTU(uint16_t* mtu); | |
59 virtual int GetOption(Option opt, int* value); | 58 virtual int GetOption(Option opt, int* value); |
60 virtual int SetOption(Option opt, int value); | 59 virtual int SetOption(Option opt, int value); |
61 | 60 |
62 private: | 61 private: |
63 void CreateSink(); | 62 void CreateSink(); |
64 bool SetAsync(int events); | 63 bool SetAsync(int events); |
65 int DoConnect(const SocketAddress& addr); | 64 int DoConnect(const SocketAddress& addr); |
66 bool HandleClosed(int close_error); | 65 bool HandleClosed(int close_error); |
67 void PostClosed(); | 66 void PostClosed(); |
68 void UpdateLastError(); | 67 void UpdateLastError(); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 DWORD id_; | 153 DWORD id_; |
155 }; | 154 }; |
156 | 155 |
157 /////////////////////////////////////////////////////////////////////////////// | 156 /////////////////////////////////////////////////////////////////////////////// |
158 | 157 |
159 } // namespace rtc | 158 } // namespace rtc |
160 | 159 |
161 #endif // WEBRTC_WIN | 160 #endif // WEBRTC_WIN |
162 | 161 |
163 #endif // WEBRTC_BASE_WIN32SOCKETSERVER_H_ | 162 #endif // WEBRTC_BASE_WIN32SOCKETSERVER_H_ |
OLD | NEW |