@Test public void testGetMaximumFragmentLengthReturnsDefaultValueForUnknownPeer() { clientConnectionStore.clear(); InetSocketAddress unknownPeer = serverHelper.serverEndpoint; int maxFragmentLength = client.getMaximumFragmentLength(unknownPeer); assertThat(maxFragmentLength, is(DTLSConnector.DEFAULT_IPV4_MTU - DTLSSession.DTLS_HEADER_LENGTH - DTLSConnector.IPV4_HEADER_LENGTH)); }
public final int getMaximumFragmentLength(InetSocketAddress peer) { Connection con = connectionStore.get(peer); if (con != null && con.hasEstablishedSession()) { return con.getEstablishedSession().getMaxFragmentLength(); } else { return getMaxDatagramSize(peer.getAddress() instanceof Inet6Address) - DTLSSession.DTLS_HEADER_LENGTH; } }
DTLSConnector implements Connector, RecordLayer { public final int getMaximumFragmentLength(InetSocketAddress peer) { Connection con = connectionStore.get(peer); if (con != null && con.hasEstablishedSession()) { return con.getEstablishedSession().getMaxFragmentLength(); } else { return getMaxDatagramSize(peer.getAddress() instanceof Inet6Address) - DTLSSession.DTLS_HEADER_LENGTH; } } }
DTLSConnector implements Connector, RecordLayer { public final int getMaximumFragmentLength(InetSocketAddress peer) { Connection con = connectionStore.get(peer); if (con != null && con.hasEstablishedSession()) { return con.getEstablishedSession().getMaxFragmentLength(); } else { return getMaxDatagramSize(peer.getAddress() instanceof Inet6Address) - DTLSSession.DTLS_HEADER_LENGTH; } } DTLSConnector(DtlsConnectorConfig configuration);  DTLSConnector(final DtlsConnectorConfig configuration, final SessionCache sessionCache); protected  DTLSConnector(final DtlsConnectorConfig configuration, final ResumptionSupportingConnectionStore connectionStore); }
DTLSConnector implements Connector, RecordLayer { public final int getMaximumFragmentLength(InetSocketAddress peer) { Connection con = connectionStore.get(peer); if (con != null && con.hasEstablishedSession()) { return con.getEstablishedSession().getMaxFragmentLength(); } else { return getMaxDatagramSize(peer.getAddress() instanceof Inet6Address) - DTLSSession.DTLS_HEADER_LENGTH; } } DTLSConnector(DtlsConnectorConfig configuration);  DTLSConnector(final DtlsConnectorConfig configuration, final SessionCache sessionCache); protected  DTLSConnector(final DtlsConnectorConfig configuration, final ResumptionSupportingConnectionStore connectionStore); final synchronized void setExecutor(ExecutorService executor); final void close(InetSocketAddress peerAddress); @Override final synchronized void start(); final synchronized void forceResumeSessionFor(InetSocketAddress peer); final synchronized void forceResumeAllSessions(); final synchronized void clearConnectionState(); @Override final void stop(); @Override final synchronized void destroy(); Future<Void> startDropConnectionsForPrincipal(final Principal principal); Future<Void> startTerminateConnectionsForPrincipal(
			final LeastRecentlyUsedCache.Predicate<Principal> principalHandler); Future<Void> startForEach(LeastRecentlyUsedCache.Predicate<Connection> handler); @Override void processRecord(Record record, Connection connection); @Override final void send(final RawData message); final DTLSSession getSessionByAddress(InetSocketAddress address); @Override void dropReceivedRecord(Record record); @Override int getMaxDatagramSize(boolean ipv6); @NoPublicAPI @Override void sendFlight(List<DatagramPacket> datagrams); @Deprecated final int getMaximumTransmissionUnit(); final int getMaximumFragmentLength(InetSocketAddress peer); @Override final InetSocketAddress getAddress(); @Override final boolean isRunning(); @Override void setRawDataReceiver(final RawDataChannel messageHandler); @Override void setEndpointContextMatcher(EndpointContextMatcher endpointContextMatcher); final void setAlertHandler(AlertHandler handler); @Override String getProtocol(); @Override String toString(); }
DTLSConnector implements Connector, RecordLayer { public final int getMaximumFragmentLength(InetSocketAddress peer) { Connection con = connectionStore.get(peer); if (con != null && con.hasEstablishedSession()) { return con.getEstablishedSession().getMaxFragmentLength(); } else { return getMaxDatagramSize(peer.getAddress() instanceof Inet6Address) - DTLSSession.DTLS_HEADER_LENGTH; } } DTLSConnector(DtlsConnectorConfig configuration);  DTLSConnector(final DtlsConnectorConfig configuration, final SessionCache sessionCache); protected  DTLSConnector(final DtlsConnectorConfig configuration, final ResumptionSupportingConnectionStore connectionStore); final synchronized void setExecutor(ExecutorService executor); final void close(InetSocketAddress peerAddress); @Override final synchronized void start(); final synchronized void forceResumeSessionFor(InetSocketAddress peer); final synchronized void forceResumeAllSessions(); final synchronized void clearConnectionState(); @Override final void stop(); @Override final synchronized void destroy(); Future<Void> startDropConnectionsForPrincipal(final Principal principal); Future<Void> startTerminateConnectionsForPrincipal(
			final LeastRecentlyUsedCache.Predicate<Principal> principalHandler); Future<Void> startForEach(LeastRecentlyUsedCache.Predicate<Connection> handler); @Override void processRecord(Record record, Connection connection); @Override final void send(final RawData message); final DTLSSession getSessionByAddress(InetSocketAddress address); @Override void dropReceivedRecord(Record record); @Override int getMaxDatagramSize(boolean ipv6); @NoPublicAPI @Override void sendFlight(List<DatagramPacket> datagrams); @Deprecated final int getMaximumTransmissionUnit(); final int getMaximumFragmentLength(InetSocketAddress peer); @Override final InetSocketAddress getAddress(); @Override final boolean isRunning(); @Override void setRawDataReceiver(final RawDataChannel messageHandler); @Override void setEndpointContextMatcher(EndpointContextMatcher endpointContextMatcher); final void setAlertHandler(AlertHandler handler); @Override String getProtocol(); @Override String toString(); static final String KEY_TLS_SERVER_HOST_NAME; }