28 #ifndef V8_PLATFORM_SOCKET_H_
29 #define V8_PLATFORM_SOCKET_H_
63 int Send(const
char* buffer,
int length) V8_WARN_UNUSED_RESULT;
64 int Receive(
char* buffer,
int length) V8_WARN_UNUSED_RESULT;
67 bool SetReuseAddress(
bool reuse_address);
70 return native_handle_ != kInvalidNativeHandle;
73 static int GetLastError();
77 typedef int NativeHandle;
78 static const NativeHandle kInvalidNativeHandle = -1;
80 typedef SOCKET NativeHandle;
81 static const NativeHandle kInvalidNativeHandle = INVALID_SOCKET;
85 return native_handle_;
88 return native_handle_;
92 explicit Socket(NativeHandle native_handle) : native_handle_(native_handle) {}
94 NativeHandle native_handle_;
101 #endif // V8_PLATFORM_SOCKET_H_
NativeHandle & native_handle()
Mutex::NativeHandle NativeHandle
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
const NativeHandle & native_handle() const
#define V8_WARN_UNUSED_RESULT