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

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

Issue 10739002: Added broadcasting feature to UDP server sockets. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed Win code. Created 8 years, 5 months 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
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 7
8 #include "net/base/completion_callback.h" 8 #include "net/base/completion_callback.h"
9 #include "net/udp/datagram_socket.h" 9 #include "net/udp/datagram_socket.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 virtual int SendTo(IOBuffer* buf, 52 virtual int SendTo(IOBuffer* buf,
53 int buf_len, 53 int buf_len,
54 const IPEndPoint& address, 54 const IPEndPoint& address,
55 const CompletionCallback& callback) = 0; 55 const CompletionCallback& callback) = 0;
56 56
57 // Set the receive buffer size (in bytes) for the socket. 57 // Set the receive buffer size (in bytes) for the socket.
58 virtual bool SetReceiveBufferSize(int32 size) = 0; 58 virtual bool SetReceiveBufferSize(int32 size) = 0;
59 59
60 // Set the send buffer size (in bytes) for the socket. 60 // Set the send buffer size (in bytes) for the socket.
61 virtual bool SetSendBufferSize(int32 size) = 0; 61 virtual bool SetSendBufferSize(int32 size) = 0;
62
63 // Allows the socket to share the local address to which socket will
64 // be bound with other sockets. Should be called before Listen.
Sergey Ulanov 2012/07/12 18:15:37 nit: s/Listen/Listen()/
wtc 2012/07/12 23:49:47 It would be nice to point out that this is often a
ygorshenin1 2012/07/16 10:29:44 Done.
ygorshenin1 2012/07/16 10:29:44 Done.
65 virtual void AllowAddressReuse() = 0;
66
67 // Makes the socket ready for broadcasting. Should be called before
Sergey Ulanov 2012/07/12 18:15:37 This comment is not very clear. Suggest "Allow sen
ygorshenin1 2012/07/16 10:29:44 Done.
68 // Listen.
Sergey Ulanov 2012/07/12 18:15:37 nit: s/Listen/Listen()/
ygorshenin1 2012/07/16 10:29:44 Done.
69 virtual void AllowBroadcast() = 0;
62 }; 70 };
63 71
64 } // namespace net 72 } // namespace net
65 73
66 #endif // NET_UDP_DATAGRAM_SERVER_SOCKET_H_ 74 #endif // NET_UDP_DATAGRAM_SERVER_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698