| Index: net/tools/quic/quic_simple_server_packet_writer.h
|
| diff --git a/net/tools/quic/quic_simple_server_packet_writer.h b/net/tools/quic/quic_simple_server_packet_writer.h
|
| index 3a6b562d63976871e1c46934f965e61f3f1b473a..598e35f96f496121f69412cba8f002129fc350c7 100644
|
| --- a/net/tools/quic/quic_simple_server_packet_writer.h
|
| +++ b/net/tools/quic/quic_simple_server_packet_writer.h
|
| @@ -33,15 +33,19 @@ class QuicSimpleServerPacketWriter : public QuicPacketWriter {
|
| QuicBlockedWriterInterface* blocked_writer);
|
| ~QuicSimpleServerPacketWriter() override;
|
|
|
| - // Use this method to write packets rather than WritePacket:
|
| - // QuicSimpleServerPacketWriter requires a callback to exist for every
|
| - // write, which will be called once the write completes.
|
| - virtual WriteResult WritePacketWithCallback(const char* buffer,
|
| - size_t buf_len,
|
| - const IPAddress& self_address,
|
| - const IPEndPoint& peer_address,
|
| - PerPacketOptions* options,
|
| - WriteCallback callback);
|
| + // Wraps WritePacket, and ensures that |callback| is run on successful write.
|
| + WriteResult WritePacketWithCallback(const char* buffer,
|
| + size_t buf_len,
|
| + const IPAddress& self_address,
|
| + const IPEndPoint& peer_address,
|
| + PerPacketOptions* options,
|
| + WriteCallback callback);
|
| +
|
| + WriteResult WritePacket(const char* buffer,
|
| + size_t buf_len,
|
| + const IPAddress& self_address,
|
| + const IPEndPoint& peer_address,
|
| + PerPacketOptions* options) override;
|
|
|
| void OnWriteComplete(int rv);
|
|
|
| @@ -51,14 +55,6 @@ class QuicSimpleServerPacketWriter : public QuicPacketWriter {
|
| void SetWritable() override;
|
| QuicByteCount GetMaxPacketSize(const IPEndPoint& peer_address) const override;
|
|
|
| - protected:
|
| - // Do not call WritePacket on its own -- use WritePacketWithCallback
|
| - WriteResult WritePacket(const char* buffer,
|
| - size_t buf_len,
|
| - const IPAddress& self_address,
|
| - const IPEndPoint& peer_address,
|
| - PerPacketOptions* options) override;
|
| -
|
| private:
|
| UDPServerSocket* socket_;
|
|
|
|
|