Skip to content

Commit

Permalink
provides bindNow shortcut for the server (rsocket#830)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegDokuka authored May 10, 2020
1 parent fdc9b1b commit 69ca818
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rsocket-core/src/main/java/io/rsocket/core/RSocketServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 290,14 @@ public Mono<T> get() {
});
}

/**
* Start the server on the given transport. Effectively is a shortcut for {@code
* .bind(ServerTransport).block()}
*/
public <T extends Closeable> T bindNow(ServerTransport<T> transport) {
return bind(transport).block();
}

/**
* An alternative to {@link #bind(ServerTransport)} that is useful for installing RSocket on a
* server that is started independently.
Expand Down

0 comments on commit 69ca818

Please sign in to comment.