| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 BLIMP_NET_BLIMP_MESSAGE_OUTPUT_BUFFER_H_ | 5 #ifndef BLIMP_NET_BLIMP_MESSAGE_OUTPUT_BUFFER_H_ |
| 6 #define BLIMP_NET_BLIMP_MESSAGE_OUTPUT_BUFFER_H_ | 6 #define BLIMP_NET_BLIMP_MESSAGE_OUTPUT_BUFFER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| 11 #include <queue> | 11 #include <queue> |
| 12 #include <utility> | 12 #include <utility> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "blimp/net/blimp_message_checkpoint_observer.h" | 15 #include "blimp/net/blimp_message_checkpoint_observer.h" |
| 16 #include "blimp/net/blimp_message_processor.h" | 16 #include "blimp/net/blimp_message_processor.h" |
| 17 #include "blimp/net/blimp_net_export.h" | 17 #include "blimp/net/blimp_net_export.h" |
| 18 #include "net/base/completion_callback.h" | 18 #include "net/base/completion_callback.h" |
| 19 | 19 |
| 20 namespace blimp { | 20 namespace blimp { |
| 21 | 21 |
| 22 class BlimpConnection; | |
| 23 | |
| 24 // Provides a FIFO buffer for reliable, ordered message delivery. | 22 // Provides a FIFO buffer for reliable, ordered message delivery. |
| 25 // Messages are retained for redelivery until they are acknowledged by the | 23 // Messages are retained for redelivery until they are acknowledged by the |
| 26 // receiving end (via BlimpMessageCheckpointObserver). | 24 // receiving end (via BlimpMessageCheckpointObserver). |
| 27 // Messages can be paired with callbacks that are invoked on successful | 25 // Messages can be paired with callbacks that are invoked on successful |
| 28 // message acknowledgment. | 26 // message acknowledgment. |
| 29 // (Redelivery will be used in a future CL to implement Fast Recovery | 27 // (Redelivery will be used in a future CL to implement Fast Recovery |
| 30 // of dropped connections.) | 28 // of dropped connections.) |
| 31 // BlimpMessageOutputBuffer is created on the UI thread, and then used and | 29 // BlimpMessageOutputBuffer is created on the UI thread, and then used and |
| 32 // destroyed on the IO thread. | 30 // destroyed on the IO thread. |
| 33 class BLIMP_NET_EXPORT BlimpMessageOutputBuffer | 31 class BLIMP_NET_EXPORT BlimpMessageOutputBuffer |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // The messages in |ack_buffer_| are contiguous with the messages in | 92 // The messages in |ack_buffer_| are contiguous with the messages in |
| 95 // |write_buffer_|. | 93 // |write_buffer_|. |
| 96 MessageBuffer ack_buffer_; | 94 MessageBuffer ack_buffer_; |
| 97 | 95 |
| 98 DISALLOW_COPY_AND_ASSIGN(BlimpMessageOutputBuffer); | 96 DISALLOW_COPY_AND_ASSIGN(BlimpMessageOutputBuffer); |
| 99 }; | 97 }; |
| 100 | 98 |
| 101 } // namespace blimp | 99 } // namespace blimp |
| 102 | 100 |
| 103 #endif // BLIMP_NET_BLIMP_MESSAGE_OUTPUT_BUFFER_H_ | 101 #endif // BLIMP_NET_BLIMP_MESSAGE_OUTPUT_BUFFER_H_ |
| OLD | NEW |