mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 09:45:31 +00:00
udp protocol: rename "write" and "from_bytes" methods
This commit is contained in:
parent
f30ab82371
commit
1c59972834
9 changed files with 27 additions and 27 deletions
|
|
@ -71,7 +71,7 @@ impl Worker {
|
|||
|
||||
for _ in events.iter() {
|
||||
while let Ok(amt) = self.socket.recv(&mut self.buffer) {
|
||||
match Response::from_bytes(&self.buffer[0..amt], self.addr.is_ipv4()) {
|
||||
match Response::parse_bytes(&self.buffer[0..amt], self.addr.is_ipv4()) {
|
||||
Ok(response) => {
|
||||
if let Some(request) = self.process_response(response) {
|
||||
self.send_request(request);
|
||||
|
|
@ -288,7 +288,7 @@ impl Worker {
|
|||
fn send_request(&mut self, request: Request) {
|
||||
let mut cursor = Cursor::new(self.buffer);
|
||||
|
||||
match request.write(&mut cursor) {
|
||||
match request.write_bytes(&mut cursor) {
|
||||
Ok(()) => {
|
||||
let position = cursor.position() as usize;
|
||||
let inner = cursor.get_ref();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue