| 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_CURVECP_PACKETIZER_H_ | 5 #ifndef NET_CURVECP_PACKETIZER_H_ |
| 6 #define NET_CURVECP_PACKETIZER_H_ | 6 #define NET_CURVECP_PACKETIZER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 unsigned char* msg, | 27 unsigned char* msg, |
| 28 size_t length) = 0; | 28 size_t length) = 0; |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 virtual ~Packetizer() {} | 31 virtual ~Packetizer() {} |
| 32 | 32 |
| 33 // Send a message on a connection. | 33 // Send a message on a connection. |
| 34 virtual int SendMessage(ConnectionKey key, | 34 virtual int SendMessage(ConnectionKey key, |
| 35 const char* data, | 35 const char* data, |
| 36 size_t length, | 36 size_t length, |
| 37 OldCompletionCallback* callback) = 0; | 37 const CompletionCallback& callback) = 0; |
| 38 | 38 |
| 39 // Close an existing connection. | 39 // Close an existing connection. |
| 40 virtual void Close(ConnectionKey key) = 0; | 40 virtual void Close(ConnectionKey key) = 0; |
| 41 | 41 |
| 42 virtual int GetPeerAddress(IPEndPoint* addresses) const = 0; | 42 virtual int GetPeerAddress(IPEndPoint* addresses) const = 0; |
| 43 | 43 |
| 44 // Returns the current maximum message size which can be fit into the next | 44 // Returns the current maximum message size which can be fit into the next |
| 45 // message payload to be sent on the packetizer. | 45 // message payload to be sent on the packetizer. |
| 46 virtual int max_message_payload() const = 0; | 46 virtual int max_message_payload() const = 0; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace net | 49 } // namespace net |
| 50 | 50 |
| 51 #endif // NET_CURVECP_PACKETIZER_H_ | 51 #endif // NET_CURVECP_PACKETIZER_H_ |
| OLD | NEW |