Commits

Paweł Wieczorek committed 96550c5 Draft

calling bind

  • Participants
  • Parent commits ff679df

Comments (0)

Files changed (2)

 
     mov $server_sockaddr,   %rdi
     mov $server_address,    %rsi
-    mov $80,                %rdx
+    mov $8081,              %rdx
     call fill_sockaddr_in
 
     call sock_create
     mov %rax,  server_socket
     # check-error
 
+    mov %rax, %rdi
+    call sock_listen
+
+    mov server_socket,      %rdi
+    mov $server_sockaddr,   %rsi
+    call sock_bind
+
     FRAME_LEAVE
 
 LOCAL_PROC serve
 
 GLOBAL_PROC sock_listen
     FRAME_ENTER
+    mov     $100,       %rsi
     call listen
     FRAME_LEAVE
 
     mov     %rdi,       %r15
     mov     %rsi,       %rdi
     movw    $PF_INET,   0x0(%r15)
+
     movw    %rdx,       0x2(%r15) # need convert endianess
     call    inet_addr
     mov     %rax,       0x4(%r15)