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

Side by Side Diff: media/cast/net/udp_transport.h

Issue 654843007: Cast: Increase UDP socket send buffer size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move code Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MEDIA_CAST_NET_UDP_TRANSPORT_H_ 5 #ifndef MEDIA_CAST_NET_UDP_TRANSPORT_H_
6 #define MEDIA_CAST_NET_UDP_TRANSPORT_H_ 6 #define MEDIA_CAST_NET_UDP_TRANSPORT_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void StartReceiving(const PacketReceiverCallback& packet_receiver); 47 void StartReceiving(const PacketReceiverCallback& packet_receiver);
48 48
49 // Set a new DSCP value to the socket. The value will be set right before 49 // Set a new DSCP value to the socket. The value will be set right before
50 // the next send. 50 // the next send.
51 void SetDscp(net::DiffServCodePoint dscp); 51 void SetDscp(net::DiffServCodePoint dscp);
52 52
53 // PacketSender implementations. 53 // PacketSender implementations.
54 virtual bool SendPacket(PacketRef packet, 54 virtual bool SendPacket(PacketRef packet,
55 const base::Closure& cb) override; 55 const base::Closure& cb) override;
56 virtual int64 GetBytesSent() override; 56 virtual int64 GetBytesSent() override;
57 virtual int SetSendBufferSize(int32 size) override;
57 58
58 private: 59 private:
59 // Requests and processes packets from |udp_socket_|. This method is called 60 // Requests and processes packets from |udp_socket_|. This method is called
60 // once with |length_or_status| set to net::ERR_IO_PENDING to start receiving 61 // once with |length_or_status| set to net::ERR_IO_PENDING to start receiving
61 // packets. Thereafter, it is called with some other value as the callback 62 // packets. Thereafter, it is called with some other value as the callback
62 // response from UdpSocket::RecvFrom(). 63 // response from UdpSocket::RecvFrom().
63 void ReceiveNextPacket(int length_or_status); 64 void ReceiveNextPacket(int length_or_status);
64 65
65 // Schedule packet receiving, if needed. 66 // Schedule packet receiving, if needed.
66 void ScheduleReceiveNextPacket(); 67 void ScheduleReceiveNextPacket();
(...skipping 21 matching lines...) Expand all
88 // NOTE: Weak pointers must be invalidated before all other member variables. 89 // NOTE: Weak pointers must be invalidated before all other member variables.
89 base::WeakPtrFactory<UdpTransport> weak_factory_; 90 base::WeakPtrFactory<UdpTransport> weak_factory_;
90 91
91 DISALLOW_COPY_AND_ASSIGN(UdpTransport); 92 DISALLOW_COPY_AND_ASSIGN(UdpTransport);
92 }; 93 };
93 94
94 } // namespace cast 95 } // namespace cast
95 } // namespace media 96 } // namespace media
96 97
97 #endif // MEDIA_CAST_NET_UDP_TRANSPORT_H_ 98 #endif // MEDIA_CAST_NET_UDP_TRANSPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698