-void adns__quproc_tosend(adns_state ads, adns_query qu, struct timeval now) {
- /* Query must be on the `tosend' queue, and we guarantee to remove it.
+static void query_usetcp(adns_state ads, adns_query qu, struct timeval now) {
+ timevaladd(&now,TCPMS);
+ qu->timeout= now;
+ qu->state= query_tcpwait;
+ LIST_LINK_TAIL(ads->timew,qu);
+ adns__query_tcp(ads,qu,now);
+ adns__tcp_tryconnect(ads,now);
+}
+
+void adns__query_udp(adns_state ads, adns_query qu, struct timeval now) {
+ /* Query must be in state udp/NONE; it will be moved to a new state,
+ * and no further processing can be done on it for now.
+ * (Resulting state is one of udp/timew, tcpwait/timew (if server not connected),
+ * tcpsent/timew, child/childw or done/output.)