Changes between Initial Version and Version 1 of Ticket #203, comment 27
- Timestamp:
- 10/30/2013 09:53:37 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #203, comment 27
initial v1 10 10 That `decode_location_hints()` returns the host and port as a tuple is symptomatic of the larger rewrite that is necessary to move to endpoints. Many wires do have a host/port concept (TCP, UDP, I2P, Tor), but others may not (Unix sockets). 11 11 12 A FURL contains the required hints for a client to find a server. I think that should directly translate to the required arguments for the client endpoints. Instead of storing `(type, host port)` for each hint, I propose that either `locationHint`, `(type, locationHint)` or `(type, reqParams)` is stored (where `reqParams` is `locationHint` with `type:` stripped from the front).12 A FURL contains the required hints for a client to find a server. I think that should directly translate to the required arguments for the client endpoints. Instead of storing `(type, host, port)` for each hint, I propose that either `locationHint`, `(type, locationHint)` or `(type, reqParams)` is stored (where `reqParams` is `locationHint` with `type:` stripped from the front). 13 13 14 14 The location hints are eventually used in `foolscap.negotiate.TubConnector.connectToAll()`, which pops a `(host, port)` pair and calls `reactor.connectTCP()` on that pair. This is where `clientFromString()` would instead be used, based on a generated client endpoint description string: