Implement flow control for http.
* grub-core/net/http.c (parse_line): Handle response 206. (http_receive): Stall if too many packets are in the queue. (http_establish): Fix range header. (http_seek): Fix double free. (http_close): Likewise. (http_packets_pulled): New function. (grub_http_protocol): Set http_seek * grub-core/net/tcp.c (grub_net_tcp_socket): New field `i_stall'. (ack_real): Set window depending on i_stall. (grub_net_send_tcp_packet): Likewise. (grub_net_tcp_stall): New function. (grub_net_tcp_unstall): Likewise. * include/grub/net/tcp.h (grub_net_tcp_stall): New proto. (grub_net_tcp_unstall): Likewise.
This commit is contained in:
parent
bd407d6e5e
commit
982f1909cf
4 changed files with 98 additions and 14 deletions
|
@ -76,4 +76,10 @@ grub_net_tcp_accept (grub_net_tcp_socket_t sock,
|
|||
void *data),
|
||||
void *hook_data);
|
||||
|
||||
void
|
||||
grub_net_tcp_stall (grub_net_tcp_socket_t sock);
|
||||
|
||||
void
|
||||
grub_net_tcp_unstall (grub_net_tcp_socket_t sock);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue