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

Unified Diff: runtime/bin/sync_socket_linux.cc

Issue 2830273002: [dart:io][windows] Implements RawSynchronousSocket (Closed)
Patch Set: Fix test and statuses Created 3 years, 8 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
Index: runtime/bin/sync_socket_linux.cc
diff --git a/runtime/bin/sync_socket_linux.cc b/runtime/bin/sync_socket_linux.cc
index 122661593f627e27a5ddd070f9f6ea41c753d3e6..f9e0145d161d958aecd8988d78ba3a245587831d 100644
--- a/runtime/bin/sync_socket_linux.cc
+++ b/runtime/bin/sync_socket_linux.cc
@@ -12,6 +12,7 @@
#include <errno.h> // NOLINT
#include "bin/fdutils.h"
+#include "bin/socket_base.h"
#include "platform/signal_blocker.h"
namespace dart {
@@ -63,6 +64,35 @@ intptr_t SynchronousSocket::CreateConnect(const RawAddr& addr) {
}
+intptr_t SynchronousSocket::Available(intptr_t fd) {
+ return SocketBase::Available(fd);
+}
+
+
+intptr_t SynchronousSocket::GetPort(intptr_t fd) {
+ return SocketBase::GetPort(fd);
+}
+
+
+SocketAddress* SynchronousSocket::GetRemotePeer(intptr_t fd, intptr_t* port) {
+ return SocketBase::GetRemotePeer(fd, port);
+}
+
+
+intptr_t SynchronousSocket::Read(intptr_t fd,
+ void* buffer,
+ intptr_t num_bytes) {
+ return SocketBase::Read(fd, buffer, num_bytes);
+}
+
+
+intptr_t SynchronousSocket::Write(intptr_t fd,
+ const void* buffer,
+ intptr_t num_bytes) {
+ return SocketBase::Write(fd, buffer, num_bytes);
+}
+
+
void SynchronousSocket::ShutdownRead(intptr_t fd) {
VOID_NO_RETRY_EXPECTED(shutdown(fd, SHUT_RD));
}
@@ -72,6 +102,11 @@ void SynchronousSocket::ShutdownWrite(intptr_t fd) {
VOID_NO_RETRY_EXPECTED(shutdown(fd, SHUT_WR));
}
+
+void SynchronousSocket::Close(intptr_t fd) {
+ return SocketBase::Close(fd);
+}
+
} // namespace bin
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698