Skip to content

Commit

Permalink
print which ctrl msg we get
Browse files Browse the repository at this point in the history
this is not showing the keepalives that show up in tcpdump
meaning the blocking read is dropping some packets
  • Loading branch information
ChillerDragon committed Jul 28, 2024
1 parent 7b4799a commit a98d00e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/teeworlds_asmr.asm
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ section .data
; teeworlds strings
s_got_peer_token db "[client] got peer token: "
l_s_got_peer_token equ $ - s_got_peer_token
s_got_ctrl_msg db "[client] got ctrl msg: "
l_s_got_ctrl_msg equ $ - s_got_ctrl_msg

section .bss
; 4 byte matching C int
Expand Down Expand Up @@ -348,7 +350,17 @@ on_ctrl_msg_token:
ret

on_ctrl_message:
push rax

call on_ctrl_msg_token

print s_got_ctrl_msg

xor rax, rax
mov al, [udp_recv_buf + PACKET_HEADER_LEN]
call print_uint32

pop rax
ret

on_packet:
Expand Down Expand Up @@ -391,7 +403,7 @@ key_a:
call recv_udp
mov rax, [udp_read_len]
test rax, rax
; if recvfrom returned negativ
; if recvfrom returned negative
; we do not process the udp payload
js keypress_end
call on_udp_packet
Expand Down

0 comments on commit a98d00e

Please sign in to comment.