The initialization function. */
| 211 | |
| 212 | /* The initialization function. */ |
| 213 | void httpd_init(void) |
| 214 | { |
| 215 | struct tcp_pcb *pcb; |
| 216 | /* Create a new TCP PCB. */ |
| 217 | pcb = tcp_new(); |
| 218 | /* Bind the PCB to TCP port 80. */ |
| 219 | tcp_bind(pcb, NULL, 80); |
| 220 | /* Change TCP state to LISTEN. */ |
| 221 | pcb = tcp_listen(pcb); |
| 222 | /* Set up http_accet() function to be called |
| 223 | * when a new connection arrives. */ |
| 224 | tcp_accept(pcb, http_accept); |
| 225 | } |
| 226 | |
| 227 | #endif /* defined(RT_USING_LWIP) && defined(EFM32_USING_ETH_HTTPD) */ |
| 228 | /***************************************************************************//** |