Just had an idea that I really like as a solution to this issue. I can modify the param signature of every remote proc to add a transport function with a default as the last argument. So a proc like `proc greet(greeting, name: wstring): Future[wstring]` gets modified to `proc greet(greeting, name: wstring, driver: NerveDriver[wstring] = defaultDriver[wstring]): Future[wstring]` and the client is able to select an appropriate transport function if desired. 1) No global state, transport function can be initialized with whatever connections right before the call. 2) Protocol agnostic, user just needs to come up with a function that returns type T where the proc return type is Future[T].
Does this meet your needs? This is probably the cleanest and most simple solution I've come up with.
