3 /* sg_transport - SG specific functions for transport */
5 /* Authors: Martin Quinson */
6 /* Copyright (C) 2004 Martin Quinson. */
8 /* This program is free software; you can redistribute it and/or modify it
9 under the terms of the license (GNU LGPL) which comes with this package. */
11 #include "Transport/transport_private.h"
14 //GRAS_LOG_EXTERNAL_CATEGORY(transport);
15 //GRAS_LOG_DEFAULT_CATEGORY(transport);
20 * Returns the next socket to service having a message awaiting.
22 * if timeout<0, we ought to implement the adaptative timeout (FIXME)
24 * if timeout=0, do not wait for new message, only handle the ones already there.
26 * if timeout>0 and no message there, wait at most that amount of time before giving up.
29 gras_trp_select(double timeout,
30 gras_socket_t **dst) {
32 double startTime=gras_time();
33 gras_procdata_t *pd=gras_procdata_get();
36 if (MSG_task_Iprobe((m_channel_t) pd->chan)) {
41 MSG_process_sleep(0.001);
43 } while (gras_time()-startTime < timeout
44 || MSG_task_Iprobe((m_channel_t) pd->chan));
51 /* dummy implementations of the functions used in RL mode */
53 gras_error_t gras_trp_tcp_setup(gras_trp_plugin_t *plug) {
54 return mismatch_error;
56 gras_error_t gras_trp_file_setup(gras_trp_plugin_t *plug) {
57 return mismatch_error;