use of io.undertow.util.SingleByteStreamSinkConduit in project undertow by undertow-io.
the class DefaultServer method wrapOpenListener.
private static ChannelListener<StreamConnection> wrapOpenListener(final ChannelListener<StreamConnection> listener) {
if (!single) {
return listener;
}
return new ChannelListener<StreamConnection>() {
@Override
public void handleEvent(StreamConnection channel) {
channel.getSinkChannel().setConduit(new SingleByteStreamSinkConduit(channel.getSinkChannel().getConduit(), 10000));
channel.getSourceChannel().setConduit(new SingleByteStreamSourceConduit(channel.getSourceChannel().getConduit(), 10000));
listener.handleEvent(channel);
}
};
}
Aggregations