apns-idheader for any given connection. These behaviors minimize the processing time consumed by the server, reducing the chances that benchmarks are measuring the performance of the mock server instead of the performance of the client.
startStarts this mock server and listens for traffic on the given port.
port- the port to which this server should bind; callers may pass
0to bind to the first available port
- a future that returns the bound port when the server has started and is ready to accept traffic
Shuts down this server and releases the port to which this server was bound. If a
nullevent loop group was provided at construction time, the server will also shut down its internally-managed event loop group.
If a non-null
EventLoopGroupwas provided at construction time, mock servers may be reconnected and reused after they have been shut down. If no event loop group was provided at construction time, mock servers may not be restarted after they have been shut down via this method.
Futurethat will succeed once the server has finished unbinding from its port and, if the server was managing its own event loop group, its event loop group has shut down