blob: 8975294f3a8213b0233a68019bdc33049cdb0748 [file] [log] [blame]
// 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.
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>
namespace dart {
namespace bin {
class DebuggerConnectionImpl {
static void StartHandler(int port_number);
static void StopHandler(intptr_t debug_fd) {}
static intptr_t Send(intptr_t socket, const char* buf, int len);
static intptr_t Receive(intptr_t socket, char* buf, int len);
static void SetupPollQueue();
static void HandleEvent(struct epoll_event* event);
static void Handler(uword args);
// File descriptors for pipes used to communicate with the debugger thread.
static int wakeup_fds_[2];
// File descriptor for the polling queue.
static intptr_t epoll_fd_;
} // namespace bin
} // namespace dart