~ When we get a direct connection in we set up its network address * then call handshake.c to set up the crypto state. */
| 705 | /*~ When we get a direct connection in we set up its network address |
| 706 | * then call handshake.c to set up the crypto state. */ |
| 707 | static struct io_plan *connection_in(struct io_conn *conn, |
| 708 | struct daemon *daemon) |
| 709 | { |
| 710 | struct conn_in conn_in_arg; |
| 711 | |
| 712 | /* Did we fail to accept? */ |
| 713 | if (!conn) |
| 714 | return accept_failed(daemon); |
| 715 | |
| 716 | conn_in_arg.addr.u.wireaddr.is_websocket = false; |
| 717 | if (!get_remote_address(conn, &conn_in_arg.addr)) |
| 718 | return io_close(conn); |
| 719 | |
| 720 | /* Don't try to set TCP options on UNIX socket! */ |
| 721 | if (conn_in_arg.addr.itype == ADDR_INTERNAL_WIREADDR) |
| 722 | set_tcp_no_delay(daemon, io_conn_fd(conn)); |
| 723 | |
| 724 | conn_in_arg.daemon = daemon; |
| 725 | conn_in_arg.is_websocket = false; |
| 726 | return conn_in(conn, &conn_in_arg); |
| 727 | } |
| 728 | |
| 729 | /*~ <hello>I speak web socket</hello>. |
| 730 | * |
nothing calls this directly
no test coverage detected