// |address_length| is a ptr to the length of the |address| buffer. This
// is an input parameter containing the maximum size |address| can hold
// and also an output parameter for the size of |address| upon completion.
- // |callback| the callback on completion of the Recv.
+ // |callback| is the callback on completion of the RecvFrom.
// Returns a net error code, or ERR_IO_PENDING if the IO is in progress.
// If ERR_IO_PENDING is returned, the caller must keep |buf|, |address|,
// and |address_length| alive until the callback is called.
const CompletionCallback& callback);
// Set the receive buffer size (in bytes) for the socket.
- bool SetReceiveBufferSize(int32 size);
+ int SetReceiveBufferSize(int32 size);
// Set the send buffer size (in bytes) for the socket.
- bool SetSendBufferSize(int32 size);
+ int SetSendBufferSize(int32 size);
// Returns true if the socket is already connected or bound.
bool is_connected() const { return socket_ != kInvalidSocket; }
// Return a network error code.
int SetDiffServCodePoint(DiffServCodePoint dscp);
+ // Resets the thread to be used for thread-safety checks.
+ void DetachFromThread();
+
private:
enum SocketOptions {
SOCKET_OPTION_REUSE_ADDRESS = 1 << 0,