-
Notifications
You must be signed in to change notification settings - Fork 0
snp quic #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
turuslan
wants to merge
52
commits into
master
Choose a base branch
from
snp/quic
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
snp quic #20
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
1b02d30
snp quic
turuslan f67cf4e
ci
turuslan ed8eb71
ci
turuslan f7cf132
snp quic + rebase
turuslan 8444b77
merge rebase
turuslan bffc90b
forward
turuslan e499d39
make_shared
turuslan 95699a2
move
turuslan 89f987b
weak
turuslan 0c9f159
set coro thread
turuslan f742c39
coro yield
turuslan e814063
enum type
turuslan bbddad4
cppcodec macro
turuslan b12bdcd
numeric limits
turuslan 856d7f4
if return
turuslan 5bb57a4
likely
turuslan b853b9a
self from void
turuslan 22699ad
example
turuslan ef17c47
sizeof
turuslan 9814d46
rename
turuslan 387193e
rename self
turuslan 0bfb4fd
error text
turuslan b9d83cc
comment
turuslan 90b06ab
comment
turuslan a34d339
comment
turuslan 25c3e6d
variant get
turuslan 6aa4b49
hash constraint
turuslan ad703ed
forward
turuslan 749ee00
comment
turuslan 34c487a
executor constraint
turuslan 8e9d06e
optional
turuslan 4c9e48b
revert optional
turuslan f5b2466
update qtils
turuslan 927632c
soralog
turuslan e97ecc8
if
turuslan 4572529
make shared
turuslan bb881b5
revert "make shared"
turuslan 812e33f
port type
turuslan 2eaf302
shutdown
turuslan 5632697
remove
turuslan 790ce87
log socket read/write error
turuslan 7526bb9
Merge remote-tracking branch 'origin/master' into snp/quic
turuslan b932469
soralog constructor
turuslan 7169543
build md
turuslan b4173f0
make shared private
turuslan 5b679c7
rename
turuslan e8b2c10
rename
turuslan a22e48b
deprecated
turuslan 4443997
singleton connection id counter
turuslan f40fcb4
CREATE_SHARED_METHOD
turuslan d6e0106
test
turuslan 943204b
move file
turuslan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ LINUX_PACKAGES="make \ | |
curl \ | ||
git \ | ||
libtool \ | ||
nasm \ | ||
ninja-build \ | ||
pkg-config \ | ||
python3.12 \ | ||
|
@@ -22,7 +23,9 @@ MACOS_PACKAGES="make \ | |
rust \ | ||
curl \ | ||
git \ | ||
go \ | ||
libtool \ | ||
nasm \ | ||
ninja \ | ||
pkg-config \ | ||
[email protected] \ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
```bash | ||
brew install nasm # vcpkg liblsquic | ||
``` | ||
|
||
`pip` can't install packages on MacOS. | ||
Specify venv directory with `-D Python3_ROOT_DIR=$PWD/.venv` cmake flag. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
These features were rejected, don't suggest them again. | ||
|
||
```c++ | ||
#define FORWARD(x) std::forward<decltype(x)>(x) | ||
auto foo(auto &&x) { | ||
bar(FORWARD(x)); | ||
} | ||
``` | ||
|
||
```c++ | ||
#define MAKE_SHARED_(x_, ...) std::make_shared<decltype(x_)::element_type>(...) | ||
struct Foo { | ||
Foo() : MAKE_SHARED_(bar_, ...) {} | ||
std::shared_ptr<Bar> bar_; | ||
}; | ||
``` | ||
|
||
```c++ | ||
#define MAKE_SHARED_T(x) std::forward<decltype(x)>(x) | ||
using Foo = std::shared_ptr<...>; | ||
MAKE_SHARED_T(Foo, ...); | ||
``` | ||
|
||
```c++ | ||
#define MOVE(x) x{std::move(x)} | ||
auto lambda = [MOVE(x)]() {}; | ||
``` | ||
|
||
```c++ | ||
#define MOVE_(x) x##_{std::move(x)} | ||
struct Foo { | ||
Foo(Bar bar) : MOVE_(bar) {} | ||
Bar bar_; | ||
}; | ||
``` | ||
|
||
```c++ | ||
#define WEAK_SELF weak_self{weak_from_this()} | ||
auto lambda = [WEAK_SELF]() {}; | ||
``` | ||
|
||
```c++ | ||
#define WEAK_LOCK(x) auto x = weak_##x.lock(); if (not x) return | ||
auto lambda = [weak_self]() { | ||
WEAK_LOCK(self); | ||
... | ||
}; | ||
``` | ||
|
||
```c++ | ||
class MakeSharedPrivate { | ||
private: | ||
MakeSharedPrivate() = default; | ||
public: | ||
static auto make() { | ||
return MakeSharedPrivate{}; | ||
} | ||
}; | ||
class Foo : public std::enable_shared_from_this<> { | ||
public: | ||
Foo(MakeSharedPrivate, ...); | ||
static std::shared_ptr<Foo> factory(...) { | ||
// `Foo` can call `MakeSharedPrivate` constructor | ||
return std::make_shared<Foo>(MakeSharedPrivate::make(), ...); | ||
} | ||
}; | ||
// error, MakeSharedPrivate has private constructor | ||
injector.create<std::shared_ptr<Foo>>(); | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# | ||
# Copyright Quadrivium LLC | ||
# All Rights Reserved | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
add_subdirectory(snp_chat) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# | ||
# Copyright Quadrivium LLC | ||
# All Rights Reserved | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
add_executable(example_snp_chat | ||
main.cpp | ||
) | ||
target_link_libraries(example_snp_chat | ||
logger | ||
snp | ||
) | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.