*/
struct GNUNET_PeerIdentity peer;
+ /**
+ * GNUNET_YES if corking is allowed, GNUNET_NO if not.
+ */
+ uint32_t cork GNUNET_PACKED;
+
+ /**
+ * Always 0.
+ */
+ uint64_t reserved GNUNET_PACKED;
+
};
*/
uint16_t smr_id;
+ /**
+ * Is corking allowed?
+ */
+ int cork;
+
};
sm->priority = htonl (th->priority);
sm->deadline = GNUNET_TIME_absolute_hton (th->timeout);
sm->peer = pr->peer;
+ sm->cork = htonl ((uint32_t) th->cork);
+ sm->reserved = htonl (0);
ret = th->get_message (th->get_message_cls,
size - sizeof (struct SendMessage),
&sm[1]);
th->timeout = GNUNET_TIME_relative_to_absolute (maxdelay);
th->priority = priority;
th->msize = notify_size;
+ th->cork = cork;
/* bound queue size */
if (pr->queue_size == handle->queue_size)
{
GNUNET_i2s (&sm->peer),
(unsigned int) msize);
#endif
+ GNUNET_break (0 == ntohl (sm->reserved));
e = GNUNET_malloc (sizeof (struct MessageEntry) + msize);
e->deadline = GNUNET_TIME_absolute_ntoh (sm->deadline);
e->priority = ntohl (sm->priority);
e->size = msize;
+ if (GNUNET_YES != (int) ntohl (sm->cork))
+ e->got_slack = GNUNET_YES;
memcpy (&e[1], &sm[1], msize);
/* insert, keep list sorted by deadline */
"Asking core (1) for transmission to peer `%4s'\n",
GNUNET_i2s (&p2.id));
if (NULL == GNUNET_CORE_notify_transmit_ready (p1.ch,
+ GNUNET_YES,
0,
GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 45),
&p2.id,
if (p1.ch != NULL)
GNUNET_break (NULL !=
GNUNET_CORE_notify_transmit_ready (p1.ch,
+ GNUNET_NO,
0,
FAST_TIMEOUT,
&p2.id,
start_time = GNUNET_TIME_absolute_get ();
GNUNET_break (NULL !=
GNUNET_CORE_notify_transmit_ready (p1.ch,
+ GNUNET_NO,
0,
TIMEOUT,
&p2.id,
if (n == tr_n)
GNUNET_break (NULL !=
GNUNET_CORE_notify_transmit_ready (p1.ch,
+ GNUNET_NO,
0,
FAST_TIMEOUT,
&p2.id,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Connected to myself; sending message!\n");
GNUNET_CORE_notify_transmit_ready (core,
+ GNUNET_YES,
0, GNUNET_TIME_UNIT_FOREVER_REL,
peer,
sizeof (struct GNUNET_MessageHeader),
(p1.connect_status == 1) )
GNUNET_break (NULL !=
GNUNET_CORE_notify_transmit_ready (p1.ch,
+ GNUNET_NO,
0,
FAST_TIMEOUT,
&p2.id,
measure_task = GNUNET_SCHEDULER_add_delayed(MEASUREMENT_LENGTH, &measurement_stop, NULL);
GNUNET_break (NULL != GNUNET_CORE_notify_transmit_ready (p1.ch,
- 0,
- TIMEOUT,
- &p2.id,
- MESSAGESIZE,
- &transmit_ready, &p1));
+ GNUNET_NO,
+ 0,
+ TIMEOUT,
+ &p2.id,
+ MESSAGESIZE,
+ &transmit_ready, &p1));
}
}
if (running == GNUNET_YES)
GNUNET_break (NULL !=
GNUNET_CORE_notify_transmit_ready (p1.ch,
+ GNUNET_NO,
0,
FAST_TIMEOUT,
&p2.id,