File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ section .data
39
39
dd 0
40
40
dd 0
41
41
42
+ cleanup db "cleanup" , 10 , 0
43
+ loop_enter db "entering loop" , 10 , 0
42
44
server_on db "Server is running on port 3000" , 0
43
45
44
46
section .text
79
81
call printf
80
82
81
83
.accept_loop:
84
+ lea rcx , [ rel cleanup ]
85
+ call printf
86
+
82
87
mov rcx , [ rel listen_socket ]
83
88
xor rdx , rdx
84
89
xor r8 , r8
@@ -121,6 +126,14 @@ main:
121
126
lea rdx , [ rel route_buffer ]
122
127
call printf
123
128
129
+ mov al , byte [ rel method_buffer ]
130
+ test al , al
131
+ je .accept_loop
132
+
133
+ mov al , byte [ rel route_buffer ]
134
+ test al , al
135
+ je .accept_loop
136
+
124
137
lea rcx , [ rel method_buffer ]
125
138
lea rdx , [ rel route_buffer ]
126
139
call lookup
@@ -134,6 +147,9 @@ main:
134
147
call rax
135
148
136
149
.cleanup:
150
+ lea rcx , [ rel cleanup ]
151
+ call printf
152
+
137
153
mov rcx , [ rel client_socket ]
138
154
139
155
mov edx , 1
@@ -142,8 +158,13 @@ main:
142
158
mov rcx , [ rel client_socket ]
143
159
call closesocket
144
160
161
+ lea rcx , [ rel cleanup ]
162
+ call printf
163
+
145
164
jmp .accept_loop
146
165
166
+ ret
167
+
147
168
.fail_socket_ins:
148
169
call fail_socket
149
170
jmp .exit
You can’t perform that action at this time.
0 commit comments