Class ForeignQuicheConnection
java.lang.Object
org.eclipse.jetty.quic.quiche.QuicheConnection
org.eclipse.jetty.quic.quiche.foreign.ForeignQuicheConnection
-
Nested Class Summary
Nested classes/interfaces inherited from class QuicheConnection
QuicheConnection.CloseInfo, QuicheConnection.TokenMinter, QuicheConnection.TokenValidationException, QuicheConnection.TokenValidator -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ForeignQuicheConnectionconnect(QuicheConfig quicheConfig, InetSocketAddress local, InetSocketAddress peer) static ForeignQuicheConnectionconnect(QuicheConfig quicheConfig, InetSocketAddress local, InetSocketAddress peer, int connectionIdLength) voiddispose()intdrainCipherBytes(ByteBuffer buffer) Fill the given buffer with cipher text to be sent.intdrainClearBytesForStream(long streamId, ByteBuffer buffer) intfeedCipherBytes(ByteBuffer buffer, SocketAddress local, SocketAddress peer) Read the buffer of cipher text coming from the network.intfeedClearBytesForStream(long streamId, ByteBuffer buffer, boolean last) static byte[]fromPacket(ByteBuffer packet) byte[]booleanbooleanbooleanbooleanisStreamFinished(long streamId) iterableStreamIds(boolean write) intstatic booleannegotiate(QuicheConnection.TokenMinter tokenMinter, ByteBuffer packetRead, ByteBuffer packetToSend) longvoidvoidshutdownStream(long streamId, boolean writeSide, long error) static ForeignQuicheConnectiontryAccept(QuicheConfig quicheConfig, QuicheConnection.TokenValidator tokenValidator, ByteBuffer packetRead, SocketAddress local, SocketAddress peer) longlongwindowCapacity(long streamId) Methods inherited from class QuicheConnection
feedClearBytesForStream, feedFinForStream, readableStreamIds, writableStreamIds
-
Method Details
-
fromPacket
-
connect
public static ForeignQuicheConnection connect(QuicheConfig quicheConfig, InetSocketAddress local, InetSocketAddress peer) throws IOException - Throws:
IOException
-
connect
public static ForeignQuicheConnection connect(QuicheConfig quicheConfig, InetSocketAddress local, InetSocketAddress peer, int connectionIdLength) throws IOException - Throws:
IOException
-
negotiate
public static boolean negotiate(QuicheConnection.TokenMinter tokenMinter, ByteBuffer packetRead, ByteBuffer packetToSend) throws IOException - Throws:
IOException
-
tryAccept
public static ForeignQuicheConnection tryAccept(QuicheConfig quicheConfig, QuicheConnection.TokenValidator tokenValidator, ByteBuffer packetRead, SocketAddress local, SocketAddress peer) throws IOException - Throws:
IOException
-
getPeerCertificate
public byte[] getPeerCertificate()- Specified by:
getPeerCertificatein classQuicheConnection
-
iterableStreamIds
- Specified by:
iterableStreamIdsin classQuicheConnection
-
feedCipherBytes
public int feedCipherBytes(ByteBuffer buffer, SocketAddress local, SocketAddress peer) throws IOException Description copied from class:QuicheConnectionRead the buffer of cipher text coming from the network.- Specified by:
feedCipherBytesin classQuicheConnection- Parameters:
buffer- the buffer to read.local- the local address on which the buffer was received.peer- the address of the peer from which the buffer was received.- Returns:
- how many bytes were consumed.
- Throws:
IOException
-
drainCipherBytes
Description copied from class:QuicheConnectionFill the given buffer with cipher text to be sent.- Specified by:
drainCipherBytesin classQuicheConnection- Parameters:
buffer- the buffer to fill.- Returns:
- how many bytes were added to the buffer.
- Throws:
IOException
-
isConnectionClosed
public boolean isConnectionClosed()- Specified by:
isConnectionClosedin classQuicheConnection
-
isConnectionEstablished
public boolean isConnectionEstablished()- Specified by:
isConnectionEstablishedin classQuicheConnection
-
nextTimeout
public long nextTimeout()- Specified by:
nextTimeoutin classQuicheConnection
-
onTimeout
public void onTimeout()- Specified by:
onTimeoutin classQuicheConnection
-
getNegotiatedProtocol
- Specified by:
getNegotiatedProtocolin classQuicheConnection
-
close
- Specified by:
closein classQuicheConnection
-
dispose
public void dispose()- Specified by:
disposein classQuicheConnection
-
isDraining
public boolean isDraining()- Specified by:
isDrainingin classQuicheConnection
-
maxLocalStreams
public int maxLocalStreams()- Specified by:
maxLocalStreamsin classQuicheConnection
-
windowCapacity
public long windowCapacity()- Specified by:
windowCapacityin classQuicheConnection
-
windowCapacity
- Specified by:
windowCapacityin classQuicheConnection- Throws:
IOException
-
shutdownStream
- Specified by:
shutdownStreamin classQuicheConnection- Throws:
IOException
-
feedClearBytesForStream
public int feedClearBytesForStream(long streamId, ByteBuffer buffer, boolean last) throws IOException - Specified by:
feedClearBytesForStreamin classQuicheConnection- Throws:
IOException
-
drainClearBytesForStream
- Specified by:
drainClearBytesForStreamin classQuicheConnection- Throws:
IOException
-
isStreamFinished
public boolean isStreamFinished(long streamId) - Specified by:
isStreamFinishedin classQuicheConnection
-
getRemoteCloseInfo
- Specified by:
getRemoteCloseInfoin classQuicheConnection
-
getLocalCloseInfo
- Specified by:
getLocalCloseInfoin classQuicheConnection
-