1 Star 0 Fork 1

setoutsoft / libquic

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

QUIC, a multiplexed stream transport over UDP

QUIC is an experimental protocol aimed at reducing web latency over that of TCP. On the surface, QUIC is very similar to TCP+TLS+SPDY implemented on UDP. Because TCP is implemented in operating system kernels, and middlebox firmware, making significant changes to TCP is next to impossible. However, since QUIC is built on top of UDP, it suffers from no such limitations.

Key features of QUIC over existing TCP+TLS+SPDY include

  • Dramatically reduced connection establishment time
  • Improved congestion control
  • Multiplexing without head of line blocking
  • Forward error correction
  • Connection migration

See Chromium QUIC Page for detailed information.

libquic

This repository is sources and dependencies extracted from Chromium's QUIC Implementation with a few modifications and patches to minimize dependencies needed to build QUIC library.

Notable and only dependency is BoringSSL. The BoringSSL sources is already embedded in this repository and linked with CMake build file. You don't need any kind of dependency installs.

Language Bindings

This library is intended as an essential reference point for other language bindings and possibly for integration with other C/C++ codebase such as HTTP servers like Apache or nginx.

Currently there is only one experimental language binding:

Getting Started

How to build

Building with CMake and Ninja (Recommended):

$ mkdir build/
$ cd build/
$ cmake -GNinja ..
$ ninja

Building with CMake and Make:

$ mkdir build/
$ cd build/
$ cmake ..
$ make -j 4

make -j limits the number of simultaneously executed Recepies. Adapt this number to the capabilities of your build machine.

libquic.a library file will be generated. libssl.a, libcrypto.a will be located in build/boringssl directory.

To do release builds run $ cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. instead of $ cmake -GNinja ...

How to integrate

In order to integrate libquic to your code, your best source of documentation is official Chromium QUIC toy client and server. Golang binding will help too.

Syncing from Upstream

Great effort has been made to make syncing from upstream Chromium sources as effortless as possible. See DEPS file for all the dependencies. See manage.py script for actual syncing.

If you want to apply upstream changes,

  1. Clone & Checkout chromium upstream.
  2. Build QUIC server: cd out/Debug; ninja quic_server
  3. Update "chromium_revision" var at DEPS to your chromium source code revision.
  4. Do ./sync.py <CHROMIUM_GIT_ROOT> All necessary files will be updated to new ones without patches applied.
  5. Temporarily commit here.
  6. Do ./sync.py <CHROMIUM_GIT_ROOT>--patch All the patches will be applied. Some patches will be rejected.
  7. If there is any patch collision, manually apply the rejected patches. Open the *.rej files and carefully apply the rejected hunks manually.
  8. Try build, and you'll find that you may need to add additional modifications to make build successful. There may be added or deleted source files. Update CMakeLists.txt accordingly.
  9. If the build is successful, make a patch by: git diff src/ > patch/basepatch.patch (Make sure you don't include custom/ directory sources to the patch)
  10. Add patch file to DEPS or update existing patch files. Amend previous commit.
  11. Commit DEPS, new patch, and source changes
// Copyright 2015 The libquic Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Devsisters Corp. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/setoutsoft/libquic.git
git@gitee.com:setoutsoft/libquic.git
setoutsoft
libquic
libquic
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891