| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch 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" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 fletch |
| OLD | NEW |