Browse Source

supporting different execution environments

pull/57/head
Volker Birk 2 months ago
parent
commit
5690a3732b
3 changed files with 12 additions and 4 deletions
  1. +1
    -1
      src/trans_auto.c
  2. +1
    -1
      src/trans_auto.h
  3. +10
    -2
      src/transport.h

+ 1
- 1
src/trans_auto.c View File

@ -42,7 +42,7 @@ PEP_STATUS auto_recvnext(PEP_SESSION session, message **msg,
}
PEP_STATUS auto_notify(signal_statuschange_t status_change,
signal_sendto_result_t sendto_result)
signal_sendto_result_t sendto_result, callback_execution cbe)
{
return PEP_STATUS_OK;


+ 1
- 1
src/trans_auto.h View File

@ -25,6 +25,6 @@ PEP_STATUS auto_recvnext(PEP_SESSION session, message **msg,
PEP_transport_status_code *tsc);
PEP_STATUS auto_notify(signal_statuschange_t status_change,
signal_sendto_result_t sendto_result);
signal_sendto_result_t sendto_result, callback_execution cbe);
#endif

+ 10
- 2
src/transport.h View File

@ -72,10 +72,18 @@ typedef PEP_STATUS (*signal_sendto_result_t)(PEP_transport_id id, char *message_
char *address, PEP_transport_status_code tsc);
// call this to receive signals
// this function does not terminate until shutdown of the transport
typedef enum _callback_execution {
PEP_cbe_polling = 0, // execute callbacks immediately only
PEP_cbe_async, // execute callbacks later on any thread
// the last one is for the transport system only
// do not implement it in transports
PEP_cbe_blocking = 255
} callback_execution;
typedef PEP_STATUS (*notify_transport_t)(signal_statuschange_t status_change,
signal_sendto_result_t sendto_result);
signal_sendto_result_t sendto_result, callback_execution cbe);
/**
* @struct _PEP_transport_t


Loading…
Cancel
Save