Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Side by Side Diff: webrtc/base/win32socketserver.h

Issue 1556743002: Bind a socket to a network if the network handle is set. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
48 virtual int RecvFrom(void *buffer, size_t length, SocketAddress *out_addr); 48 virtual int RecvFrom(void *buffer, size_t length, SocketAddress *out_addr);
49 virtual int Listen(int backlog); 49 virtual int Listen(int backlog);
50 virtual Win32Socket *Accept(SocketAddress *out_addr); 50 virtual Win32Socket *Accept(SocketAddress *out_addr);
51 virtual int Close(); 51 virtual int Close();
52 virtual int GetError() const; 52 virtual int GetError() const;
53 virtual void SetError(int error); 53 virtual void SetError(int error);
54 virtual ConnState GetState() const; 54 virtual ConnState GetState() const;
55 virtual int EstimateMTU(uint16_t* mtu); 55 virtual int EstimateMTU(uint16_t* mtu);
56 virtual int GetOption(Option opt, int* value); 56 virtual int GetOption(Option opt, int* value);
57 virtual int SetOption(Option opt, int value); 57 virtual int SetOption(Option opt, int value);
58 virtual int BindToNetwork(NetworkHandle handle);
58 59
59 private: 60 private:
60 void CreateSink(); 61 void CreateSink();
61 bool SetAsync(int events); 62 bool SetAsync(int events);
62 int DoConnect(const SocketAddress& addr); 63 int DoConnect(const SocketAddress& addr);
63 bool HandleClosed(int close_error); 64 bool HandleClosed(int close_error);
64 void PostClosed(); 65 void PostClosed();
65 void UpdateLastError(); 66 void UpdateLastError();
66 static int TranslateOption(Option opt, int* slevel, int* sopt); 67 static int TranslateOption(Option opt, int* slevel, int* sopt);
67 68
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 153 }
153 private: 154 private:
154 Win32SocketServer ss_; 155 Win32SocketServer ss_;
155 DWORD id_; 156 DWORD id_;
156 }; 157 };
157 158
158 /////////////////////////////////////////////////////////////////////////////// 159 ///////////////////////////////////////////////////////////////////////////////
159 160
160 } // namespace rtc 161 } // namespace rtc
161 162
162 #endif // WEBRTC_WIN 163 #endif // WEBRTC_WIN
163 164
164 #endif // WEBRTC_BASE_WIN32SOCKETSERVER_H_ 165 #endif // WEBRTC_BASE_WIN32SOCKETSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698