Class ForeignQuicheConnection
java.lang.Object
org.eclipse.jetty.quic.quiche.Quiche
org.eclipse.jetty.quic.quiche.foreign.ForeignQuicheConnection
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.quic.quiche.Quiche
Quiche.CloseInfo, Quiche.TokenMinter, Quiche.TokenValidationException, Quiche.TokenValidator
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static ForeignQuicheConnection
connect
(QuicheConfig quicheConfig, InetSocketAddress local, InetSocketAddress peer) static ForeignQuicheConnection
connect
(QuicheConfig quicheConfig, InetSocketAddress local, InetSocketAddress peer, int connectionIdLength) void
dispose()
int
drainCipherBytes
(ByteBuffer buffer) Fill the given buffer with cipher text to be sent.int
drainClearBytesForStream
(long streamId, ByteBuffer buffer, boolean[] last) int
feedCipherBytes
(ByteBuffer buffer, SocketAddress local, SocketAddress peer) Read the buffer of cipher text coming from the network.int
feedClearBytesForStream
(long streamId, ByteBuffer buffer, boolean last) static byte[]
fromPacket
(ByteBuffer packet) byte[]
boolean
boolean
boolean
boolean
isStreamFinished
(long streamId) iterableStreamIds
(boolean write) int
static boolean
negotiate
(Quiche.TokenMinter tokenMinter, ByteBuffer packetRead, ByteBuffer packetToSend) long
void
void
shutdownStream
(long streamId, boolean writeSide, long error) static ForeignQuicheConnection
tryAccept
(QuicheConfig quicheConfig, Quiche.TokenValidator tokenValidator, ByteBuffer packetRead, SocketAddress local, SocketAddress peer) long
long
windowCapacity
(long streamId) Methods inherited from class org.eclipse.jetty.quic.quiche.Quiche
feedClearBytesForStream, feedFinForStream, probeConnectionId, readableStreamIds, toInetSocketAddress, 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(Quiche.TokenMinter tokenMinter, ByteBuffer packetRead, ByteBuffer packetToSend) throws IOException - Throws:
IOException
-
tryAccept
public static ForeignQuicheConnection tryAccept(QuicheConfig quicheConfig, Quiche.TokenValidator tokenValidator, ByteBuffer packetRead, SocketAddress local, SocketAddress peer) throws IOException - Throws:
IOException
-
getPeerCertificate
public byte[] getPeerCertificate()- Specified by:
getPeerCertificate
in classQuiche
-
iterableStreamIds
- Specified by:
iterableStreamIds
in classQuiche
-
feedCipherBytes
public int feedCipherBytes(ByteBuffer buffer, SocketAddress local, SocketAddress peer) throws IOException Description copied from class:Quiche
Read the buffer of cipher text coming from the network.- Specified by:
feedCipherBytes
in classQuiche
- 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:Quiche
Fill the given buffer with cipher text to be sent.- Specified by:
drainCipherBytes
in classQuiche
- Parameters:
buffer
- the buffer to fill.- Returns:
- how many bytes were added to the buffer.
- Throws:
IOException
-
isConnectionClosed
public boolean isConnectionClosed()- Specified by:
isConnectionClosed
in classQuiche
-
isConnectionEstablished
public boolean isConnectionEstablished()- Specified by:
isConnectionEstablished
in classQuiche
-
nextTimeout
public long nextTimeout()- Specified by:
nextTimeout
in classQuiche
-
onTimeout
-
getNegotiatedProtocol
- Specified by:
getNegotiatedProtocol
in classQuiche
-
close
-
dispose
-
isDraining
public boolean isDraining()- Specified by:
isDraining
in classQuiche
-
maxLocalStreams
public int maxLocalStreams()- Specified by:
maxLocalStreams
in classQuiche
-
windowCapacity
public long windowCapacity()- Specified by:
windowCapacity
in classQuiche
-
windowCapacity
- Specified by:
windowCapacity
in classQuiche
- Throws:
IOException
-
shutdownStream
- Specified by:
shutdownStream
in classQuiche
- Throws:
IOException
-
feedClearBytesForStream
public int feedClearBytesForStream(long streamId, ByteBuffer buffer, boolean last) throws IOException - Specified by:
feedClearBytesForStream
in classQuiche
- Throws:
IOException
-
drainClearBytesForStream
public int drainClearBytesForStream(long streamId, ByteBuffer buffer, boolean[] last) throws IOException - Specified by:
drainClearBytesForStream
in classQuiche
- Throws:
IOException
-
isStreamFinished
public boolean isStreamFinished(long streamId) - Specified by:
isStreamFinished
in classQuiche
- Parameters:
streamId
- the stream id- Returns:
- whether all the data has been read from the specified stream.
-
getRemoteCloseInfo
- Specified by:
getRemoteCloseInfo
in classQuiche
-
getLocalCloseInfo
- Specified by:
getLocalCloseInfo
in classQuiche
-