Chromium Code Reviews| 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 WEBKIT_GLUE_P2P_TRANSPORT_H_ | 5 #ifndef WEBKIT_GLUE_P2P_TRANSPORT_H_ |
| 6 #define WEBKIT_GLUE_P2P_TRANSPORT_H_ | 6 #define WEBKIT_GLUE_P2P_TRANSPORT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 // Relay server address and port, e.g. "relay.example.com:4234". | 55 // Relay server address and port, e.g. "relay.example.com:4234". |
| 56 std::string relay_server; | 56 std::string relay_server; |
| 57 int relay_server_port; | 57 int relay_server_port; |
| 58 | 58 |
| 59 // Relay token to use for relay servers. | 59 // Relay token to use for relay servers. |
| 60 std::string relay_token; | 60 std::string relay_token; |
| 61 | 61 |
| 62 // TCP window sizes. Default size is used when set to 0. | 62 // TCP window sizes. Default size is used when set to 0. |
| 63 int tcp_receive_window; | 63 int tcp_receive_window; |
| 64 int tcp_send_window; | 64 int tcp_send_window; |
| 65 | |
| 66 // Disables Neagle's algorithm when set to true. | |
|
brettw
2011/09/01 16:49:19
Can you expand on this comment to describe what it
Sergey Ulanov
2011/09/03 21:10:02
I extended comments for this option in ppb_transpo
| |
| 67 bool tcp_no_delay; | |
| 68 | |
| 69 // TCP ACK delay. | |
| 70 int tcp_ack_delay_ms; | |
| 65 }; | 71 }; |
| 66 | 72 |
| 67 virtual ~P2PTransport() {} | 73 virtual ~P2PTransport() {} |
| 68 | 74 |
| 69 // Initialize transport using specified configuration. Returns true | 75 // Initialize transport using specified configuration. Returns true |
| 70 // if initialization succeeded. | 76 // if initialization succeeded. |
| 71 virtual bool Init(const std::string& name, | 77 virtual bool Init(const std::string& name, |
| 72 Protocol protocol, | 78 Protocol protocol, |
| 73 const Config& config, | 79 const Config& config, |
| 74 EventHandler* event_handler) = 0; | 80 EventHandler* event_handler) = 0; |
| 75 | 81 |
| 76 // Add candidate received from the remote peer. Returns false if the | 82 // Add candidate received from the remote peer. Returns false if the |
| 77 // provided address is not in a valid format. | 83 // provided address is not in a valid format. |
| 78 virtual bool AddRemoteCandidate(const std::string& address) = 0; | 84 virtual bool AddRemoteCandidate(const std::string& address) = 0; |
| 79 | 85 |
| 80 // Returns socket interface that can be used to send/receive | 86 // Returns socket interface that can be used to send/receive |
| 81 // data. Returned object is owned by the transport. Pending calls on | 87 // data. Returned object is owned by the transport. Pending calls on |
| 82 // the socket are canceled when the transport is destroyed. | 88 // the socket are canceled when the transport is destroyed. |
| 83 virtual net::Socket* GetChannel() = 0; | 89 virtual net::Socket* GetChannel() = 0; |
| 84 }; | 90 }; |
| 85 | 91 |
| 86 } // namespace webkit_glue | 92 } // namespace webkit_glue |
| 87 | 93 |
| 88 #endif // WEBKIT_GLUE_P2P_TRANSPORT_H_ | 94 #endif // WEBKIT_GLUE_P2P_TRANSPORT_H_ |
| OLD | NEW |