const static char http_index_html[] = "<html><head><title>Congrats!</title></head><body><h1>Welcome to our lwIP HTTP server!</h1> |
netconn_write(conn, http_html_hdr, sizeof(http_html_hdr)-1, NETCONN_NOCOPY); netconn_write(conn, http_index_html, sizeof(http_index_html)-1, NETCONN_NOCOPY); |
const static char http_index_start_html[] = "<html><head><title>Congrats!</title></head><body><h1>Welcome to our lwIP HTTP server!</h1> |
netconn_write(conn, http_index_start_html, sizeof(http_index_start_html)-1, NETCONN_NOCOPY); netconn_write(conn, http_index_data_html, sizeof(http_index_data_html)-1, NETCONN_NOCOPY); netconn_write(conn, http_index_end_html, sizeof(http_index_end_html)-1, NETCONN_NOCOPY); |
netconn_write(conn, http_html_hdr, sizeof(http_html_hdr)-1, NETCONN_NOCOPY); netconn_write(conn, http_index_start_html, sizeof(http_index_start_html)-1, NETCONN_NOCOPY); uint32_t i; for(i=0; i<100; i++) netconn_write(conn, http_index_data_html, sizeof(http_index_data_html)-1, NETCONN_NOCOPY); netconn_write(conn, http_index_end_html, sizeof(http_index_end_html)-1, NETCONN_NOCOPY); |
conn->pcb.tcp->flags |= TF_NODELAY; netconn_write(conn, http_html_hdr, sizeof(http_html_hdr)-1, NETCONN_NOCOPY); netconn_write(conn, http_index_start_html, sizeof(http_index_start_html)-1, NETCONN_NOCOPY); netconn_write(conn, http_index_data_html, sizeof(http_index_data_html)-1, NETCONN_NOCOPY); netconn_write(conn, http_index_end_html, sizeof(http_index_end_html)-1, NETCONN_NOCOPY); |