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

Side by Side Diff: src/shared/native_socket_windows.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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
« no previous file with comments | « src/shared/native_socket_posix.cc ('k') | src/shared/natives.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #if defined(FLETCH_TARGET_OS_WIN) && defined(FLETCH_ENABLE_LIVE_CODING) 5 #if defined(DARTINO_TARGET_OS_WIN) && defined(DARTINO_ENABLE_LIVE_CODING)
6 6
7 #include "src/shared/native_socket.h" 7 #include "src/shared/native_socket.h"
8 8
9 #include <winsock2.h> 9 #include <winsock2.h>
10 #include <ws2tcpip.h> 10 #include <ws2tcpip.h>
11 11
12 #include "src/shared/assert.h" 12 #include "src/shared/assert.h"
13 #include "src/shared/utils.h" 13 #include "src/shared/utils.h"
14 14
15 namespace fletch { 15 namespace dartino {
16 16
17 struct Socket::SocketData { 17 struct Socket::SocketData {
18 SocketData() : socket(INVALID_SOCKET), port(-1) { } 18 SocketData() : socket(INVALID_SOCKET), port(-1) { }
19 SocketData(SOCKET socket, int port) : socket(socket), port(port) { } 19 SocketData(SOCKET socket, int port) : socket(socket), port(port) { }
20 20
21 SOCKET socket; 21 SOCKET socket;
22 int port; 22 int port;
23 }; 23 };
24 24
25 Socket::Socket() : data_(new SocketData()) { 25 Socket::Socket() : data_(new SocketData()) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void Socket::SetTCPNoDelay(bool value) { 154 void Socket::SetTCPNoDelay(bool value) {
155 BOOL option = value ? 1 : 0; 155 BOOL option = value ? 1 : 0;
156 int status = setsockopt(data_->socket, IPPROTO_TCP, TCP_NODELAY, 156 int status = setsockopt(data_->socket, IPPROTO_TCP, TCP_NODELAY,
157 reinterpret_cast<char*>(&option), sizeof(option)); 157 reinterpret_cast<char*>(&option), sizeof(option));
158 if (status == SOCKET_ERROR) { 158 if (status == SOCKET_ERROR) {
159 Print::Error("Failed setting TCP_NODELAY socket options [%d]", 159 Print::Error("Failed setting TCP_NODELAY socket options [%d]",
160 WSAGetLastError()); 160 WSAGetLastError());
161 } 161 }
162 } 162 }
163 163
164 } // namespace fletch 164 } // namespace dartino
165 165
166 #endif // def'd(FLETCH_TARGET_OS_WIN) && def'd(FLETCH_ENABLE_LIVE_CODING) 166 #endif // def'd(DARTINO_TARGET_OS_WIN) && def'd(DARTINO_ENABLE_LIVE_CODING)
OLDNEW
« no previous file with comments | « src/shared/native_socket_posix.cc ('k') | src/shared/natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698