Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / net / udp / udp_socket_libevent.h
index 2d1cefd..69e8ba3 100644 (file)
@@ -70,7 +70,7 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
   // |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.
@@ -94,10 +94,10 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
              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; }
@@ -163,6 +163,9 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
   // 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,