OLD | NEW |
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_SOCKET_UDP_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_UDP_CLIENT_SOCKET_H_ |
6 #define NET_SOCKET_UDP_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_UDP_CLIENT_SOCKET_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 int buf_len, | 36 int buf_len, |
37 const CompletionCallback& callback) override; | 37 const CompletionCallback& callback) override; |
38 int Write(IOBuffer* buf, | 38 int Write(IOBuffer* buf, |
39 int buf_len, | 39 int buf_len, |
40 const CompletionCallback& callback) override; | 40 const CompletionCallback& callback) override; |
41 void Close() override; | 41 void Close() override; |
42 int GetPeerAddress(IPEndPoint* address) const override; | 42 int GetPeerAddress(IPEndPoint* address) const override; |
43 int GetLocalAddress(IPEndPoint* address) const override; | 43 int GetLocalAddress(IPEndPoint* address) const override; |
44 int SetReceiveBufferSize(int32_t size) override; | 44 int SetReceiveBufferSize(int32_t size) override; |
45 int SetSendBufferSize(int32_t size) override; | 45 int SetSendBufferSize(int32_t size) override; |
| 46 int SetDoNotFragment(bool do_not_fragment) override; |
46 const BoundNetLog& NetLog() const override; | 47 const BoundNetLog& NetLog() const override; |
47 | 48 |
48 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
49 // Switch to use non-blocking IO. Must be called right after construction and | 50 // Switch to use non-blocking IO. Must be called right after construction and |
50 // before other calls. | 51 // before other calls. |
51 void UseNonBlockingIO(); | 52 void UseNonBlockingIO(); |
52 #endif | 53 #endif |
53 | 54 |
54 private: | 55 private: |
55 UDPSocket socket_; | 56 UDPSocket socket_; |
56 NetworkChangeNotifier::NetworkHandle network_; | 57 NetworkChangeNotifier::NetworkHandle network_; |
57 DISALLOW_COPY_AND_ASSIGN(UDPClientSocket); | 58 DISALLOW_COPY_AND_ASSIGN(UDPClientSocket); |
58 }; | 59 }; |
59 | 60 |
60 } // namespace net | 61 } // namespace net |
61 | 62 |
62 #endif // NET_SOCKET_UDP_CLIENT_SOCKET_H_ | 63 #endif // NET_SOCKET_UDP_CLIENT_SOCKET_H_ |
OLD | NEW |