Refactored tcp_write code - Reduced CPU usage to respectable levels

This commit is contained in:
Joseph Henry 2015-10-06 20:32:48 -04:00
commit 36db5865e7
5 changed files with 896 additions and 69 deletions

View file

@ -110,7 +110,6 @@ private:
void handle_socket(PhySocket *sock, void **uptr, struct socket_st* socket_rpc);
void handle_connect(PhySocket *sock, void **uptr, struct connect_st* connect_rpc);
void handle_write(TcpConnection *conn);
int send_return_value(TcpConnection *conn, int retval);
void phyOnDatagram(PhySocket *sock,void **uptr,const struct sockaddr *from,void *data,unsigned long len);
@ -184,7 +183,7 @@ static err_t tapif_init(struct netif *netif)
static err_t low_level_output(struct netif *netif, struct pbuf *p)
{
fprintf(stderr, "low_level_output()\n");
//fprintf(stderr, "low_level_output()\n");
struct pbuf *q;
char buf[ZT1_MAX_MTU+32];
char *bufptr;