Skip to content
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

Release async read write for tokio v0.4.0 #20

Merged
merged 45 commits into from
Nov 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
eca25c0
Not sure if this is the way to go
GunnarMorrigan Jul 12, 2024
30d435f
WIP: macros for reason codes and properties for wire length and asyn…
GunnarMorrigan Nov 17, 2024
dfd5a5f
fix: test_read_write_properties in publish stack overflow
GunnarMorrigan Nov 17, 2024
9b211e5
delete Cargo.lock
GunnarMorrigan Nov 19, 2024
0268b04
delete examples folder
GunnarMorrigan Nov 19, 2024
6554d4b
covert properties and reason codes to macro
GunnarMorrigan Nov 20, 2024
8b0011d
cargo fix
GunnarMorrigan Nov 20, 2024
a2cb749
removed unused imports and make items private
GunnarMorrigan Nov 20, 2024
1e95074
add more packet async read and fix some small stuff
GunnarMorrigan Nov 20, 2024
7f939c3
use codecov secret
GunnarMorrigan Nov 20, 2024
8b5486f
remove commented code
GunnarMorrigan Nov 20, 2024
173f911
Touch up docs
GunnarMorrigan Nov 23, 2024
e874911
More docs
GunnarMorrigan Nov 24, 2024
2adf952
added write to all packets
GunnarMorrigan Nov 26, 2024
fe0b6ba
Small cargo changes etc
GunnarMorrigan Nov 26, 2024
4014236
Fix bug not wiring variable length of properties
GunnarMorrigan Nov 26, 2024
e343b71
fix: write packet id in puback pubcomp pubrec and pubrel
GunnarMorrigan Nov 26, 2024
df0a2fc
move disconnect async packet write
GunnarMorrigan Nov 26, 2024
14cc249
fix reading publish packet
GunnarMorrigan Nov 26, 2024
b1f84bf
adjust function names of reading and writing packets
GunnarMorrigan Nov 26, 2024
133f2f2
Impl from ReadError and WriteError into ConnectionError
GunnarMorrigan Nov 26, 2024
6cb9cd5
add first fuzzing target
GunnarMorrigan Nov 26, 2024
c0216b2
change AsyncReadExt to AsyncRead
GunnarMorrigan Nov 26, 2024
cdcf93a
Remove concurrent tokio support
GunnarMorrigan Nov 26, 2024
9c1cbc2
Remove Concurrent event handler
GunnarMorrigan Nov 26, 2024
822a666
Return on err writing variable integer
GunnarMorrigan Nov 26, 2024
fa087b7
Removing benchmarks
GunnarMorrigan Nov 26, 2024
b615567
Fix cargo lint in fuzzing
GunnarMorrigan Nov 26, 2024
53881bf
add rust-toolchain for fuzzing
GunnarMorrigan Nov 26, 2024
78def56
fuzz: expose reader functions for fuzzing
GunnarMorrigan Nov 26, 2024
782dda6
added tokio and smol tcp examples again
GunnarMorrigan Nov 27, 2024
1ce35da
final things before 0.4.0
GunnarMorrigan Nov 27, 2024
1c914c8
fix up test cases
GunnarMorrigan Nov 27, 2024
4fc4924
bump version number to v0.4.0
GunnarMorrigan Nov 27, 2024
1040da6
linter
GunnarMorrigan Nov 28, 2024
fd71dfd
update cargo deny
GunnarMorrigan Nov 28, 2024
0a009ca
add suback and unsuback test cases
GunnarMorrigan Nov 28, 2024
621b517
fix write unsubcribe
GunnarMorrigan Nov 28, 2024
5caa701
fix wire_length and write length
GunnarMorrigan Nov 28, 2024
3439e95
examples in readme and example dir
GunnarMorrigan Nov 28, 2024
2536930
add entry in readme about fuzzing
GunnarMorrigan Nov 28, 2024
d96cb78
remove AsyncWriteExt mentions for smol too
GunnarMorrigan Nov 28, 2024
25a59de
remove first_byte function
GunnarMorrigan Nov 28, 2024
8d5cb02
more test cases and fix in pub rel, comp and rec
GunnarMorrigan Nov 28, 2024
634e05b
Disable fuzzing crate, gives errors in windows
GunnarMorrigan Nov 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fuzz: expose reader functions for fuzzing
GunnarMorrigan committed Nov 27, 2024
commit 78def56ad49487d4b984289d6e578a71450bcb4a
4 changes: 2 additions & 2 deletions mqrstt/src/packets/primitive/fixed_header.rs
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ pub(crate) struct FixedHeader {
}

impl FixedHeader {
pub fn read_fixed_header(mut header: Iter<u8>) -> Result<(Self, usize), ReadBytes<DeserializeError>> {
pub(crate) fn read_fixed_header(mut header: Iter<u8>) -> Result<(Self, usize), ReadBytes<DeserializeError>> {
if header.len() < 2 {
return Err(ReadBytes::InsufficientBytes(2 - header.len()));
}
@@ -46,7 +46,7 @@ impl FixedHeader {
Ok((Self { packet_type, flags, remaining_length }, header_length))
}

pub async fn async_read<S>(stream: &mut S) -> Result<(Self, usize), crate::packets::error::ReadError>
pub(crate) async fn async_read<S>(stream: &mut S) -> Result<(Self, usize), crate::packets::error::ReadError>
where
S: tokio::io::AsyncRead + Unpin,
{