Exemplo n.º 1
0
/**
 * Enqueue query hit built by creating a message.
 * Callback for qhit_build_results().
 */
static void
browse_host_record_hit(void *data, size_t len, void *udata)
{
	struct browse_host_upload *bh = udata;

	bh->hits = g_slist_prepend(bh->hits, gmsg_to_pmsg(data, len));
}
Exemplo n.º 2
0
/**
 * Enqueue query hit built by creating a message.
 * Callback for qhit_build_results().
 */
static void
browse_host_record_hit(void *data, size_t len, void *udata)
{
	struct browse_host_upload *bh = udata;

	special_upload_browse_check(udata);
	bh->hits = pslist_prepend(bh->hits, gmsg_to_pmsg(data, len));
}
Exemplo n.º 3
0
/**
 * Send a datagram to the specified node, made of `len' bytes from `buf',
 * forming a valid Gnutella message.
 */
void
udp_send_msg(const gnutella_node_t *n, const void *buf, int len)
{
	pmsg_t *mb;

	g_assert(NODE_IS_UDP(n));
	g_return_if_fail(n->outq);

	/*
	 * If message is directed to a UDP node that can do semi-reliable UDP,
	 * then turn on reliability on the message.
	 */

	mb = gmsg_to_pmsg(buf, len);
	if (NODE_CAN_SR_UDP(n))
		pmsg_mark_reliable(mb);
	mq_udp_node_putq(n->outq, mb, n);
}