2017-12-15 01:47:31 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2017 The Netty Project
|
|
|
|
*
|
|
|
|
* The Netty Project licenses this file to you under the Apache License,
|
|
|
|
* version 2.0 (the "License"); you may not use this file except in compliance
|
|
|
|
* with the License. You may obtain a copy of the License at:
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*/
|
|
|
|
package io.netty.channel.epoll;
|
|
|
|
|
|
|
|
import io.netty.bootstrap.Bootstrap;
|
|
|
|
import io.netty.bootstrap.ServerBootstrap;
|
2018-01-04 17:04:32 +01:00
|
|
|
import io.netty.channel.ChannelConfig;
|
2017-12-15 01:47:31 +01:00
|
|
|
import io.netty.testsuite.transport.TestsuitePermutation;
|
|
|
|
import io.netty.testsuite.transport.socket.CompositeBufferGatheringWriteTest;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class EpollCompositeBufferGatheringWriteTest extends CompositeBufferGatheringWriteTest {
|
|
|
|
@Override
|
|
|
|
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
|
|
|
|
return EpollSocketTestPermutation.INSTANCE.socket();
|
|
|
|
}
|
2018-01-04 17:04:32 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void compositeBufferPartialWriteDoesNotCorruptDataInitServerConfig(ChannelConfig config,
|
|
|
|
int soSndBuf) {
|
|
|
|
if (config instanceof EpollChannelConfig) {
|
|
|
|
((EpollChannelConfig) config).setMaxBytesPerGatheringWrite(soSndBuf);
|
|
|
|
}
|
|
|
|
}
|
2017-12-15 01:47:31 +01:00
|
|
|
}
|