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

Side by Side Diff: src/tools/driver/connection.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/tools/driver/connection.h ('k') | src/tools/driver/driver.gyp » ('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 #include "src/tools/driver/connection.h" 5 #include "src/tools/driver/connection.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <unistd.h> 8 #include <unistd.h>
9 9
10 #include "src/shared/native_socket.h" 10 #include "src/shared/native_socket.h"
11 #include "src/shared/utils.h" 11 #include "src/shared/utils.h"
12 12
13 namespace fletch { 13 namespace dartino {
14 14
15 DriverConnection::DriverConnection(Socket* socket) : socket_(socket) {} 15 DriverConnection::DriverConnection(Socket* socket) : socket_(socket) {}
16 16
17 DriverConnection::~DriverConnection() { delete socket_; } 17 DriverConnection::~DriverConnection() { delete socket_; }
18 18
19 DriverConnection::Command DriverConnection::Receive() { 19 DriverConnection::Command DriverConnection::Receive() {
20 incoming_.ClearBuffer(); 20 incoming_.ClearBuffer();
21 uint8 header[kHeaderSize]; 21 uint8 header[kHeaderSize];
22 size_t offset = 0; 22 size_t offset = 0;
23 int fd = socket_->FileDescriptor(); 23 int fd = socket_->FileDescriptor();
(...skipping 18 matching lines...) Expand all
42 } 42 }
43 43
44 void DriverConnection::Send(Command command, const WriteBuffer& buffer) { 44 void DriverConnection::Send(Command command, const WriteBuffer& buffer) {
45 uint8 header[5]; 45 uint8 header[5];
46 Utils::WriteInt32(header, buffer.offset()); 46 Utils::WriteInt32(header, buffer.offset());
47 header[4] = command; 47 header[4] = command;
48 socket_->Write(header, 5); 48 socket_->Write(header, 5);
49 buffer.WriteTo(socket_); 49 buffer.WriteTo(socket_);
50 } 50 }
51 51
52 } // namespace fletch 52 } // namespace dartino
OLDNEW
« no previous file with comments | « src/tools/driver/connection.h ('k') | src/tools/driver/driver.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698