[−][src]Function interledger_btp::create_server
pub fn create_server<T, U, A>(
address: SocketAddr,
store: U,
next_outgoing: T
) -> impl Future<Item = BtpOutgoingService<T, A>, Error = ()> where
T: OutgoingService<A> + Clone + Send + Sync + 'static,
U: BtpStore<Account = A> + Clone + Send + Sync + 'static,
A: BtpAccount + 'static,
Returns a BtpOutgoingService that wraps all BTP/WebSocket connections that come
in on the given address. Calling handle_incoming
with an IncomingService
will
turn the returned BtpOutgoingService into a bidirectional handler.
The separation is designed to enable the returned BtpOutgoingService to be passed to another service like the Router, and then for the Router to be passed as the IncomingService to the BTP server.