Files
sdk/runtime/bin/socket.h
T
ager@google.com 607eea1402 Cleanup gypi mess.
My change that introduced a platform directory shared between vm and bin runtime components did not correctly update gypi files.

BUG=
TEST=

Review URL: http://codereview.chromium.org//9124030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3155 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 16:50:14 +00:00

39 lines
1.1 KiB
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_SOCKET_H_
#define BIN_SOCKET_H_
#include "bin/builtin.h"
#include "platform/globals.h"
class Socket {
public:
static bool Initialize();
static intptr_t Available(intptr_t fd);
static int Read(intptr_t fd, void* buffer, intptr_t num_bytes);
static int Write(intptr_t fd, const void* buffer, intptr_t num_bytes);
static intptr_t CreateConnect(const char* host, const intptr_t port);
static intptr_t GetPort(intptr_t fd);
static intptr_t GetStdioHandle(int num);
DISALLOW_ALLOCATION();
DISALLOW_IMPLICIT_CONSTRUCTORS(Socket);
};
class ServerSocket {
public:
static intptr_t Accept(intptr_t fd);
static intptr_t CreateBindListen(const char* bindAddress,
intptr_t port,
intptr_t backlog);
DISALLOW_ALLOCATION();
DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket);
};
#endif // BIN_SOCKET_H_