Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
50a1b31a8a
commit
842bbe7fcb
|
@ -70,17 +70,26 @@ public interface Quiche
|
|||
// The peer violated the local stream limits.
|
||||
QUICHE_ERR_STREAM_LIMIT = -12,
|
||||
|
||||
// The received data exceeds the stream's final size.
|
||||
QUICHE_ERR_FINAL_SIZE = -13,
|
||||
|
||||
// Error in congestion control.
|
||||
QUICHE_ERR_CONGESTION_CONTROL = -14,
|
||||
|
||||
// The specified stream was stopped by the peer.
|
||||
QUICHE_ERR_STREAM_STOPPED = -15,
|
||||
|
||||
// The specified stream was reset by the peer.
|
||||
QUICHE_ERR_STREAM_RESET = -16,
|
||||
|
||||
// The received data exceeds the stream's final size.
|
||||
QUICHE_ERR_FINAL_SIZE = -13,
|
||||
// Too many identifiers were provided.
|
||||
QUICHE_ERR_ID_LIMIT = -17,
|
||||
|
||||
// Error in congestion control.
|
||||
QUICHE_ERR_CONGESTION_CONTROL = -14;
|
||||
// Not enough available identifiers.
|
||||
QUICHE_ERR_OUT_OF_IDENTIFIERS = -18,
|
||||
|
||||
// Error in key update.
|
||||
QUICHE_ERR_KEY_UPDATE = -19;
|
||||
|
||||
static String errToString(long err)
|
||||
{
|
||||
|
@ -116,6 +125,12 @@ public interface Quiche
|
|||
return "QUICHE_ERR_STREAM_STOPPED";
|
||||
if (err == QUICHE_ERR_STREAM_RESET)
|
||||
return "QUICHE_ERR_STREAM_RESET";
|
||||
if (err == QUICHE_ERR_ID_LIMIT)
|
||||
return "QUICHE_ERR_ID_LIMIT";
|
||||
if (err == QUICHE_ERR_OUT_OF_IDENTIFIERS)
|
||||
return "QUICHE_ERR_OUT_OF_IDENTIFIERS";
|
||||
if (err == QUICHE_ERR_KEY_UPDATE)
|
||||
return "QUICHE_ERR_KEY_UPDATE";
|
||||
return "?? " + err;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class quiche_h
|
|||
{
|
||||
// This interface is a translation of the quiche.h header of a specific version.
|
||||
// It needs to be reviewed each time the native lib version changes.
|
||||
private static final String EXPECTED_QUICHE_VERSION = "0.16.0";
|
||||
private static final String EXPECTED_QUICHE_VERSION = "0.18.0";
|
||||
|
||||
public static final byte C_FALSE = 0;
|
||||
public static final byte C_TRUE = 1;
|
||||
|
|
|
@ -31,7 +31,7 @@ public interface LibQuiche extends Library
|
|||
{
|
||||
// This interface is a translation of the quiche.h header of a specific version.
|
||||
// It needs to be reviewed each time the native lib version changes.
|
||||
String EXPECTED_QUICHE_VERSION = "0.16.0";
|
||||
String EXPECTED_QUICHE_VERSION = "0.18.0";
|
||||
|
||||
// The charset used to convert java.lang.String to char * and vice versa.
|
||||
Charset CHARSET = StandardCharsets.UTF_8;
|
||||
|
@ -373,6 +373,17 @@ public interface LibQuiche extends Library
|
|||
// field of `quiche_stats`).
|
||||
int quiche_conn_path_stats(quiche_conn conn, size_t idx, quiche_path_stats out);
|
||||
|
||||
// Returns whether or not this is a server-side connection.
|
||||
boolean quiche_conn_is_server(quiche_conn conn);
|
||||
|
||||
// Schedule an ack-eliciting packet on the active path.
|
||||
ssize_t quiche_conn_send_ack_eliciting(quiche_conn conn);
|
||||
|
||||
// Schedule an ack-eliciting packet on the specified path.
|
||||
ssize_t quiche_conn_send_ack_eliciting_on_path(quiche_conn conn,
|
||||
sockaddr local, size_t local_len,
|
||||
sockaddr peer, size_t peer_len);
|
||||
|
||||
@Structure.FieldOrder({"from", "from_len", "to", "to_len", "at"})
|
||||
class quiche_send_info extends Structure
|
||||
{
|
||||
|
@ -457,6 +468,7 @@ public interface LibQuiche extends Library
|
|||
public byte dummy;
|
||||
}
|
||||
|
||||
// The side of the stream to be shut down.
|
||||
interface quiche_shutdown
|
||||
{
|
||||
int QUICHE_SHUTDOWN_READ = 0,
|
||||
|
@ -471,8 +483,25 @@ public interface LibQuiche extends Library
|
|||
int quiche_conn_stream_shutdown(quiche_conn conn, uint64_t stream_id,
|
||||
int /*quiche_shutdown*/ direction, uint64_t err);
|
||||
|
||||
// Returns the stream's send capacity in bytes.
|
||||
ssize_t quiche_conn_stream_capacity(quiche_conn conn, uint64_t stream_id);
|
||||
|
||||
// Returns true if the stream has data that can be read.
|
||||
boolean quiche_conn_stream_readable(quiche_conn conn, uint64_t stream_id);
|
||||
|
||||
// Returns the next stream that has data to read, or -1 if no such stream is
|
||||
// available.
|
||||
int64_t quiche_conn_stream_readable_next(quiche_conn conn);
|
||||
|
||||
// Returns true if the stream has enough send capacity.
|
||||
//
|
||||
// On error a value lower than 0 is returned.
|
||||
int quiche_conn_stream_writable(quiche_conn conn, uint64_t stream_id, size_t len);
|
||||
|
||||
// Returns the next stream that can be written to, or -1 if no such stream is
|
||||
// available.
|
||||
int64_t quiche_conn_stream_writable_next(quiche_conn conn);
|
||||
|
||||
// Returns true if all the data has been read from the specified stream.
|
||||
boolean quiche_conn_stream_finished(quiche_conn conn, uint64_t stream_id);
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// ========================================================================
|
||||
// Copyright (c) 1995 Mort Bay Consulting Pty Ltd and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
|
||||
// which is available at https://www.apache.org/licenses/LICENSE-2.0.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
|
||||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.quic.quiche.jna;
|
||||
|
||||
import com.sun.jna.IntegerType;
|
||||
|
||||
public class int64_t extends IntegerType
|
||||
{
|
||||
public int64_t()
|
||||
{
|
||||
this(0);
|
||||
}
|
||||
public int64_t(long v)
|
||||
{
|
||||
super(8, v, false);
|
||||
}
|
||||
}
|
2
pom.xml
2
pom.xml
|
@ -84,7 +84,7 @@
|
|||
<jboss-threads.version>3.5.0.Final</jboss-threads.version>
|
||||
<jetty-assembly-descriptors.version>1.1</jetty-assembly-descriptors.version>
|
||||
<jetty.perf-helper.version>1.0.7</jetty.perf-helper.version>
|
||||
<jetty-quiche-native.version>0.16.0</jetty-quiche-native.version>
|
||||
<jetty-quiche-native.version>0.18.0</jetty-quiche-native.version>
|
||||
<jetty.servlet.api.version>4.0.6</jetty.servlet.api.version>
|
||||
<jetty-test-policy.version>1.2</jetty-test-policy.version>
|
||||
<jetty.test.version>6.0</jetty.test.version>
|
||||
|
|
Loading…
Reference in New Issue