- client->client_closure = connection;
- client->receive = &sock_receive;
- client->receive_cancel = &sock_receive_cancel;
- client->notify_transmit_ready = &sock_notify_transmit_ready;
- client->notify_transmit_ready_cancel = &sock_notify_transmit_ready_cancel;
- client->check = &sock_check;
- client->destroy = &sock_destroy;
- client->reference_count = 1;
- add_client (server, client);
- return client;
-}
-
-
-/**
- * Add an arbitrary connection to the set of handles managed by this
- * server. This can be used if a sending and receiving does not
- * really go over the network (internal transmission) or for servers
- * using UDP.
- *
- * @param server the server to use
- * @param chandle opaque handle for the connection
- * @param creceive receive function for the connection
- * @param ccancel cancel receive function for the connection
- * @param cnotify transmit notification function for the connection
- * @param cnotify_cancel transmit notification cancellation function for the connection
- * @param ccheck function to test if the connection is still up
- * @param cdestroy function to close and free the connection
- * @return the client handle (client should call
- * "client_drop" on the return value eventually)
- */
-struct GNUNET_SERVER_Client *
-GNUNET_SERVER_connect_callback (struct
- GNUNET_SERVER_Handle
- *server,
- void *chandle,
- GNUNET_SERVER_ReceiveCallback
- creceive,
- GNUNET_SERVER_ReceiveCancelCallback
- ccancel,
- GNUNET_SERVER_TransmitReadyCallback
- cnotify,
- GNUNET_SERVER_TransmitReadyCancelCallback
- cnotify_cancel,
- GNUNET_SERVER_CheckCallback
- ccheck,
- GNUNET_SERVER_DestroyCallback cdestroy)
-{
- struct GNUNET_SERVER_Client *client;
-
- client = GNUNET_malloc (sizeof (struct GNUNET_SERVER_Client));
- client->client_closure = chandle;
- client->receive = creceive;
- client->receive_cancel = ccancel;
- client->notify_transmit_ready = cnotify;
- client->notify_transmit_ready_cancel = cnotify_cancel;
- client->check = ccheck;
- client->destroy = cdestroy;