---
title: llarp::quic

---

# llarp::quic



## Namespaces

| Name           |
| -------------- |
| **[llarp::quic::tunnel](Namespaces/namespacellarp_1_1quic_1_1tunnel.md)**  |

## Classes

|                | Name           |
| -------------- | -------------- |
| class | **[llarp::quic::Address](Classes/classllarp_1_1quic_1_1Address.md)**  |
| struct | **[llarp::quic::Path](Classes/structllarp_1_1quic_1_1Path.md)**  |
| class | **[llarp::quic::Client](Classes/classllarp_1_1quic_1_1Client.md)**  |
| struct | **[llarp::quic::ConnectionID](Classes/structllarp_1_1quic_1_1ConnectionID.md)**  |
| class | **[llarp::quic::Connection](Classes/classllarp_1_1quic_1_1Connection.md)**  |
| class | **[llarp::quic::Endpoint](Classes/classllarp_1_1quic_1_1Endpoint.md)** <br>QUIC Tunnel [Endpoint](); this is the class that implements either end of a quic tunnel for both servers and clients.  |
| struct | **[llarp::quic::io_result](Classes/structllarp_1_1quic_1_1io__result.md)**  |
| struct | **[llarp::quic::NullCrypto](Classes/structllarp_1_1quic_1_1NullCrypto.md)**  |
| struct | **[llarp::quic::Packet](Classes/structllarp_1_1quic_1_1Packet.md)**  |
| class | **[llarp::quic::Server](Classes/classllarp_1_1quic_1_1Server.md)**  |
| struct | **[llarp::quic::StreamID](Classes/structllarp_1_1quic_1_1StreamID.md)**  |
| class | **[llarp::quic::Stream](Classes/classllarp_1_1quic_1_1Stream.md)**  |
| class | **[llarp::quic::TunnelManager](Classes/classllarp_1_1quic_1_1TunnelManager.md)** <br>Manager class for incoming and outgoing QUIC tunnels.  |

## Types

|                | Name           |
| -------------- | -------------- |
| typedef std::basic_string_view< std::byte > | **[bstring_view](Namespaces/namespacellarp_1_1quic.md#typedef-bstring-view)**  |

## Functions

|                | Name           |
| -------------- | -------------- |
| auto | **[get_time](Namespaces/namespacellarp_1_1quic.md#function-get-time)**()<br>Returns the current (monotonic) time as a time_point.  |
| uint64_t | **[get_timestamp](Namespaces/namespacellarp_1_1quic.md#function-get-timestamp)**(const std::chrono::steady_clock::time_point & t =get_time())<br>Converts a time_point as returned by get_time to a nanosecond timestamp (as ngtcp2 expects).  |
| template <typename Container ,typename  =std::enable_if_t<          sizeof(typename std::remove_reference_t<Container>::value_type) == sizeof(uint8_t)>\> <br>auto * | **[u8data](Namespaces/namespacellarp_1_1quic.md#function-u8data)**(Container && c) |

## Attributes

|                | Name           |
| -------------- | -------------- |
| constexpr const std::array< uint8_t, 8 > | **[handshake_magic_bytes](Namespaces/namespacellarp_1_1quic.md#variable-handshake-magic-bytes)**  |
| constexpr std::basic_string_view< uint8_t > | **[handshake_magic](Namespaces/namespacellarp_1_1quic.md#variable-handshake-magic)**  |
| constexpr uint64_t | **[CONNECTION_BUFFER](Namespaces/namespacellarp_1_1quic.md#variable-connection-buffer)**  |
| constexpr uint64_t | **[STREAM_BUFFER](Namespaces/namespacellarp_1_1quic.md#variable-stream-buffer)**  |
| constexpr uint64_t | **[STREAM_LIMIT](Namespaces/namespacellarp_1_1quic.md#variable-stream-limit)**  |
| constexpr auto | **[IDLE_TIMEOUT](Namespaces/namespacellarp_1_1quic.md#variable-idle-timeout)**  |
| constexpr std::byte | **[CLIENT_TO_SERVER](Namespaces/namespacellarp_1_1quic.md#variable-client-to-server)**  |
| constexpr std::byte | **[SERVER_TO_CLIENT](Namespaces/namespacellarp_1_1quic.md#variable-server-to-client)**  |
| constexpr uint64_t | **[STREAM_ERROR_EXCEPTION](Namespaces/namespacellarp_1_1quic.md#variable-stream-error-exception)**  |
| constexpr uint64_t | **[STREAM_ERROR_CONNECTION_EXPIRED](Namespaces/namespacellarp_1_1quic.md#variable-stream-error-connection-expired)**  |

## Types Documentation

### typedef bstring_view

```cpp
typedef std::basic_string_view< std::byte > llarp::quic::bstring_view;
```



## Functions Documentation

### function get_time

```cpp
inline auto get_time()
```

Returns the current (monotonic) time as a time_point. 

### function get_timestamp

```cpp
inline uint64_t get_timestamp(
    const std::chrono::steady_clock::time_point & t =get_time()
)
```

Converts a time_point as returned by get_time to a nanosecond timestamp (as ngtcp2 expects). 

### function u8data

```cpp
template <typename Container ,
typename  =std::enable_if_t<          sizeof(typename std::remove_reference_t<Container>::value_type) == sizeof(uint8_t)>>
inline auto * u8data(
    Container && c
)
```



## Attributes Documentation

### variable handshake_magic_bytes

```cpp
constexpr const std::array< uint8_t, 8 > handshake_magic_bytes {
      'l', 'o', 'k', 'i', 'n', 'e', 't', 0x01};
```


### variable handshake_magic

```cpp
constexpr std::basic_string_view< uint8_t > handshake_magic {
      handshake_magic_bytes.data(), handshake_magic_bytes.size()};
```


### variable CONNECTION_BUFFER

```cpp
constexpr uint64_t CONNECTION_BUFFER = 1024 * 1024;
```


### variable STREAM_BUFFER

```cpp
constexpr uint64_t STREAM_BUFFER = 64 * 1024;
```


### variable STREAM_LIMIT

```cpp
constexpr uint64_t STREAM_LIMIT = 32;
```


### variable IDLE_TIMEOUT

```cpp
constexpr auto IDLE_TIMEOUT = 5min;
```


### variable CLIENT_TO_SERVER

```cpp
constexpr std::byte CLIENT_TO_SERVER {1};
```


### variable SERVER_TO_CLIENT

```cpp
constexpr std::byte SERVER_TO_CLIENT {2};
```


### variable STREAM_ERROR_EXCEPTION

```cpp
constexpr uint64_t STREAM_ERROR_EXCEPTION = (1ULL << 62) - 2;
```


### variable STREAM_ERROR_CONNECTION_EXPIRED

```cpp
constexpr uint64_t STREAM_ERROR_CONNECTION_EXPIRED = (1ULL << 62) + 1;
```





-------------------------------

Updated on 2022-10-26 at 17:18:03 +0000