- * Task for connecting the peer to stream as client
- *
- * @param cls PeerData
- * @param tc the TaskContext
- */
-static void
-stream_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
-{
- struct PeerData *peer = cls;
- struct GNUNET_PeerIdentity self;
-
- GNUNET_assert (&peer1 == peer);
- GNUNET_assert (GNUNET_OK == GNUNET_TESTING_get_peer_identity (config,
- &self));
- /* Connect to stream */
- peer->socket = GNUNET_STREAM_open (config,
- &self, /* Null for local peer? */
- 10, /* App port */
- &stream_open_cb,
- &peer1,
- GNUNET_STREAM_OPTION_TESTING_SET_WRITE_SEQUENCE_NUMBER,
- UINT32_MAX - GNUNET_CRYPTO_random_u32
- (GNUNET_CRYPTO_QUALITY_WEAK, 64),
- GNUNET_STREAM_OPTION_END);
- GNUNET_assert (NULL != peer->socket);
-}
-
-
-/**
- * Testing function
- *
- * @param cls NULL
- * @param tc the task context