Package io.bytestreams.exchange.core
Interface SocketConfigurator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Configures a
Socket.
Use this to set socket options such as timeouts, keep-alive, TCP no-delay, and buffer sizes.
For client sockets, the configurator is called before connecting so that options requiring
pre-connect setup (e.g. SO_RCVBUF) are safely applied. For accepted server sockets, it is
called after accept.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SocketConfiguratorA no-op configurator that leaves the socket with default settings. -
Method Summary
-
Field Details
-
DEFAULT
A no-op configurator that leaves the socket with default settings.
-
-
Method Details
-
configure
Configures the given socket.- Parameters:
socket- the socket to configure- Throws:
IOException- if configuration fails
-