v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Socket Class Referenceabstract

#include <platform.h>

Inheritance diagram for Socket:

Public Member Functions

virtual ~Socket ()
 
virtual bool Bind (const int port)=0
 
virtual bool Listen (int backlog) const =0
 
virtual SocketAccept () const =0
 
virtual bool Connect (const char *host, const char *port)=0
 
virtual bool Shutdown ()=0
 
virtual int Send (const char *data, int len) const =0
 
virtual int Receive (char *data, int len) const =0
 
virtual bool SetReuseAddress (bool reuse_address)=0
 
virtual bool IsValid () const =0
 

Static Public Member Functions

static bool SetUp ()
 
static int LastError ()
 
static uint16_t HToN (uint16_t value)
 
static uint16_t NToH (uint16_t value)
 
static uint32_t HToN (uint32_t value)
 
static uint32_t NToH (uint32_t value)
 

Detailed Description

Definition at line 665 of file platform.h.

Constructor & Destructor Documentation

virtual ~Socket ( )
inlinevirtual

Definition at line 667 of file platform.h.

Member Function Documentation

virtual Socket* Accept ( ) const
pure virtual

Implemented in Win32Socket, and POSIXSocket.

virtual bool Bind ( const int  port)
pure virtual

Implemented in Win32Socket, and POSIXSocket.

virtual bool Connect ( const char *  host,
const char *  port 
)
pure virtual

Implemented in Win32Socket, and POSIXSocket.

uint16_t HToN ( uint16_t  value)
static

Definition at line 525 of file platform-posix.cc.

uint32_t HToN ( uint32_t  value)
static

Definition at line 535 of file platform-posix.cc.

virtual bool IsValid ( ) const
pure virtual

Implemented in Win32Socket, and POSIXSocket.

int LastError ( )
static

Definition at line 520 of file platform-posix.cc.

virtual bool Listen ( int  backlog) const
pure virtual

Implemented in Win32Socket, and POSIXSocket.

uint16_t NToH ( uint16_t  value)
static

Definition at line 530 of file platform-posix.cc.

uint32_t NToH ( uint32_t  value)
static

Definition at line 540 of file platform-posix.cc.

virtual int Receive ( char *  data,
int  len 
) const
pure virtual

Implemented in Win32Socket, and POSIXSocket.

virtual int Send ( const char *  data,
int  len 
) const
pure virtual

Implemented in Win32Socket, and POSIXSocket.

virtual bool SetReuseAddress ( bool  reuse_address)
pure virtual

Implemented in Win32Socket, and POSIXSocket.

bool SetUp ( )
static

Definition at line 514 of file platform-posix.cc.

virtual bool Shutdown ( )
pure virtual

Implemented in Win32Socket, and POSIXSocket.


The documentation for this class was generated from the following files: