Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Side by Side Diff: net/udp/datagram_server_socket.h

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/udp/udp_client_socket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_UDP_DATAGRAM_SERVER_SOCKET_H_ 5 #ifndef NET_UDP_DATAGRAM_SERVER_SOCKET_H_
6 #define NET_UDP_DATAGRAM_SERVER_SOCKET_H_ 6 #define NET_UDP_DATAGRAM_SERVER_SOCKET_H_
7 #pragma once 7 #pragma once
8 8
9 #include "net/base/completion_callback.h" 9 #include "net/base/completion_callback.h"
10 #include "net/udp/datagram_socket.h" 10 #include "net/udp/datagram_socket.h"
(...skipping 21 matching lines...) Expand all
32 // |address_length| is a ptr to the length of the |address| buffer. This 32 // |address_length| is a ptr to the length of the |address| buffer. This
33 // is an input parameter containing the maximum size |address| can hold 33 // is an input parameter containing the maximum size |address| can hold
34 // and also an output parameter for the size of |address| upon completion. 34 // and also an output parameter for the size of |address| upon completion.
35 // |callback| the callback on completion of the Recv. 35 // |callback| the callback on completion of the Recv.
36 // Returns a net error code, or ERR_IO_PENDING if the IO is in progress. 36 // Returns a net error code, or ERR_IO_PENDING if the IO is in progress.
37 // If ERR_IO_PENDING is returned, the caller must keep |buf|, |address|, 37 // If ERR_IO_PENDING is returned, the caller must keep |buf|, |address|,
38 // and |address_length| alive until the callback is called. 38 // and |address_length| alive until the callback is called.
39 virtual int RecvFrom(IOBuffer* buf, 39 virtual int RecvFrom(IOBuffer* buf,
40 int buf_len, 40 int buf_len,
41 IPEndPoint* address, 41 IPEndPoint* address,
42 OldCompletionCallback* callback) = 0; 42 const CompletionCallback& callback) = 0;
43 43
44 // Send to a socket with a particular destination. 44 // Send to a socket with a particular destination.
45 // |buf| is the buffer to send 45 // |buf| is the buffer to send
46 // |buf_len| is the number of bytes to send 46 // |buf_len| is the number of bytes to send
47 // |address| is the recipient address. 47 // |address| is the recipient address.
48 // |address_length| is the size of the recipient address 48 // |address_length| is the size of the recipient address
49 // |callback| is the user callback function to call on complete. 49 // |callback| is the user callback function to call on complete.
50 // Returns a net error code, or ERR_IO_PENDING if the IO is in progress. 50 // Returns a net error code, or ERR_IO_PENDING if the IO is in progress.
51 // If ERR_IO_PENDING is returned, the caller must keep |buf| and |address| 51 // If ERR_IO_PENDING is returned, the caller must keep |buf| and |address|
52 // alive until the callback is called. 52 // alive until the callback is called.
53 virtual int SendTo(IOBuffer* buf, 53 virtual int SendTo(IOBuffer* buf,
54 int buf_len, 54 int buf_len,
55 const IPEndPoint& address, 55 const IPEndPoint& address,
56 OldCompletionCallback* callback) = 0; 56 const CompletionCallback& callback) = 0;
57 57
58 // Set the receive buffer size (in bytes) for the socket. 58 // Set the receive buffer size (in bytes) for the socket.
59 virtual bool SetReceiveBufferSize(int32 size) = 0; 59 virtual bool SetReceiveBufferSize(int32 size) = 0;
60 60
61 // Set the send buffer size (in bytes) for the socket. 61 // Set the send buffer size (in bytes) for the socket.
62 virtual bool SetSendBufferSize(int32 size) = 0; 62 virtual bool SetSendBufferSize(int32 size) = 0;
63 }; 63 };
64 64
65 } // namespace net 65 } // namespace net
66 66
67 #endif // NET_UDP_DATAGRAM_SERVER_SOCKET_H_ 67 #endif // NET_UDP_DATAGRAM_SERVER_SOCKET_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/udp/udp_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698