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

Unified Diff: webrtc/base/physicalsocketserver.h

Issue 1616153007: Stay writable after partial socket writes. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: More feedback. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/base/physicalsocketserver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/physicalsocketserver.h
diff --git a/webrtc/base/physicalsocketserver.h b/webrtc/base/physicalsocketserver.h
index ae1f10f596d8b66b49ab5372b1ad4c52186c4321..8409306a4e35c736515e26051162d6fab16b0bc7 100644
--- a/webrtc/base/physicalsocketserver.h
+++ b/webrtc/base/physicalsocketserver.h
@@ -68,8 +68,8 @@ class PhysicalSocketServer : public SocketServer {
AsyncSocket* CreateAsyncSocket(int type) override;
AsyncSocket* CreateAsyncSocket(int family, int type) override;
- // Internal Factory for Accept
- AsyncSocket* WrapSocket(SOCKET s);
+ // Internal Factory for Accept (virtual so it can be overwritten in tests).
+ virtual AsyncSocket* WrapSocket(SOCKET s);
// SocketServer:
bool Wait(int cms, bool process_io) override;
@@ -161,6 +161,13 @@ class PhysicalSocket : public AsyncSocket, public sigslot::has_slots<> {
// Make virtual so ::accept can be overwritten in tests.
virtual SOCKET DoAccept(SOCKET socket, sockaddr* addr, socklen_t* addrlen);
+ // Make virtual so ::send can be overwritten in tests.
+ virtual int DoSend(SOCKET socket, const char* buf, int len, int flags);
+
+ // Make virtual so ::sendto can be overwritten in tests.
+ virtual int DoSendTo(SOCKET socket, const char* buf, int len, int flags,
+ const struct sockaddr* dest_addr, socklen_t addrlen);
+
void OnResolveResult(AsyncResolverInterface* resolver);
void UpdateLastError();
« no previous file with comments | « no previous file | webrtc/base/physicalsocketserver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698