View Javadoc
1   /*
2    * Copyright 2021 The Netty Project
3    *
4    * The Netty Project licenses this file to you under the Apache License,
5    * version 2.0 (the "License"); you may not use this file except in compliance
6    * with the License. You may obtain a copy of the License at:
7    *
8    *   https://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13   * License for the specific language governing permissions and limitations
14   * under the License.
15   */
16  package io.netty.channel.unix;
17  
18  import io.netty.buffer.ByteBufAllocator;
19  import io.netty.channel.ChannelConfig;
20  import io.netty.channel.ChannelOption;
21  import io.netty.channel.MessageSizeEstimator;
22  import io.netty.channel.RecvByteBufAllocator;
23  import io.netty.channel.WriteBufferWaterMark;
24  
25  /**
26   * A {@link ChannelConfig} for a {@link DomainDatagramChannel}.
27   *
28   * <h3>Available options</h3>
29   *
30   * In addition to the options provided by {@link ChannelConfig},
31   * {@link DomainDatagramChannelConfig} allows the following options in the option map:
32   *
33   * <table border="1" cellspacing="0" cellpadding="6">
34   * <tr>
35   * <th>Name</th><th>Associated setter method</th>
36   * </tr><tr>
37   * <td>{@link ChannelOption#SO_SNDBUF}</td><td>{@link #setSendBufferSize(int)}</td>
38   * </tr>
39   * </table>
40   */
41  public interface DomainDatagramChannelConfig extends ChannelConfig {
42  
43      @Override
44      DomainDatagramChannelConfig setAllocator(ByteBufAllocator allocator);
45  
46      @Override
47      DomainDatagramChannelConfig setAutoClose(boolean autoClose);
48  
49      @Override
50      DomainDatagramChannelConfig setAutoRead(boolean autoRead);
51  
52      @Override
53      DomainDatagramChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis);
54  
55      @Override
56      @Deprecated
57      DomainDatagramChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead);
58  
59      @Override
60      DomainDatagramChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator);
61  
62      @Override
63      DomainDatagramChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator);
64  
65      /**
66       * Sets the {@link java.net.StandardSocketOptions#SO_SNDBUF} option.
67       */
68      DomainDatagramChannelConfig setSendBufferSize(int sendBufferSize);
69  
70      /**
71       * Gets the {@link java.net.StandardSocketOptions#SO_SNDBUF} option.
72       */
73      int getSendBufferSize();
74  
75      @Override
76      DomainDatagramChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark);
77  
78      @Override
79      DomainDatagramChannelConfig setWriteSpinCount(int writeSpinCount);
80  }