87a43bef60
This is a slightly cleaned up version of the code that Devon created. All of eventhandler and socket in bin is designed for async communication only. Therefore, it does not make much sense to use it for something as simple as this. I have put the sync send and receive operations into DebuggerConnectionImpl instead of attempting to use the async Socket::Read and Socket::Write. R=devoncarew@google.com,sgjesse@google.com,hausner@google.com BUG= Review URL: https://codereview.chromium.org//11642019 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16336 260f80e4-7a28-3924-810f-c04153c831b5
19 lines
593 B
C++
19 lines
593 B
C++
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef BIN_DBG_CONNECTION_WIN_H_
|
|
#define BIN_DBG_CONNECTION_WIN_H_
|
|
|
|
class DebuggerConnectionImpl {
|
|
public:
|
|
static void StartHandler(int port_number);
|
|
static intptr_t Send(intptr_t socket, const char* buf, int len);
|
|
static intptr_t Receive(intptr_t socket, char* buf, int len);
|
|
|
|
private:
|
|
static void ThreadEntry(uword args);
|
|
};
|
|
|
|
#endif // BIN_DBG_CONNECTION_WIN_H_
|