multichan becomes AsyncQueue and AsyncProtocol
r1957 | dcl | 2007-05-11 17:28:31 +1000 (Fri, 11 May 2007) | 2 lines
This commit is contained in:
62
multichan.h
62
multichan.h
@@ -12,43 +12,37 @@
|
||||
#ifndef SICSMULTICHAN
|
||||
#define SICSMULTICHAN
|
||||
|
||||
#define MCC_TIMEOUT -1
|
||||
#define MCC_DISCONNECT -2
|
||||
#define MCC_RECONNECT -3
|
||||
#define MCC_RETRY_CMD -4
|
||||
#define MCC_POP_CMD -5
|
||||
#include <asyncqueue.h>
|
||||
|
||||
typedef struct __MultiChan MultiChan, *pMultiChan;
|
||||
/* transitional definitions*/
|
||||
#define MCC_TIMEOUT AQU_TIMEOUT
|
||||
#define MCC_DISCONNECT AQU_DISCONNECT
|
||||
#define MCC_RECONNECT AQU_RECONNECT
|
||||
#define MCC_RETRY_CMD AQU_RETRY_CMD
|
||||
#define MCC_POP_CMD AQU_POP_CMD
|
||||
#define MCC_Transmit AQU_Transmit
|
||||
#define MCC_Receive AQU_Receive
|
||||
#define MCC_Notify AQU_Notify
|
||||
|
||||
int MultiChanFactory(SConnection *pCon, SicsInterp *pSics,
|
||||
void *pData, int argc, char *argv[]);
|
||||
#define __MultiChan __AsyncUnit
|
||||
#define MultiChan AsyncUnit
|
||||
#define pMultiChan pAsyncUnit
|
||||
|
||||
int MultiChanCreate(const char* controller, pMultiChan* handle);
|
||||
#define MultiChanCreate AsyncUnitCreate
|
||||
#define MultiChanCreateHost AsyncUnitCreateHost
|
||||
#define MultiChanDestroy AsyncUnitDestroy
|
||||
#define MultiChanReconnect AsyncUnitReconnect
|
||||
#define MultiChanGetSocket AsyncUnitGetSocket
|
||||
#define MultiChanEnqueTxn AsyncUnitEnqueTxn
|
||||
#define MultiChanEnque AsyncUnitEnque
|
||||
#define MultiChanWrite AsyncUnitWrite
|
||||
#define MultiChanSetNotify AsyncUnitSetNotify
|
||||
#define MultiChanGetDelay AsyncUnitGetDelay
|
||||
#define MultiChanSetDelay AsyncUnitSetDelay
|
||||
#define MultiChanGetTimeout AsyncUnitGetTimeout
|
||||
#define MultiChanSetTimeout AsyncUnitSetTimeout
|
||||
|
||||
int MultiChanCreateHost(const char* host,
|
||||
const char* port,
|
||||
pMultiChan* handle);
|
||||
int MultiChanDestroy(pMultiChan handle);
|
||||
|
||||
int MultiChanReconnect(pMultiChan handle);
|
||||
|
||||
mkChannel* MultiChanGetSocket(pMultiChan handle);
|
||||
|
||||
typedef int (*MCC_Transmit)(void* context);
|
||||
typedef int (*MCC_Receive)(void* context, int ch);
|
||||
int MultiChanEnque(pMultiChan unit, void* context, MCC_Transmit tx, MCC_Receive rx);
|
||||
|
||||
int MultiChanWrite(pMultiChan unit, void* buffer, int buflen);
|
||||
|
||||
typedef void (*MCC_Notify)(void* context, int event);
|
||||
void MultiChanSetNotify(pMultiChan unit, void* context, MCC_Notify notify);
|
||||
|
||||
int MultiChanGetDelay(pMultiChan unit);
|
||||
int MultiChanSetDelay(pMultiChan unit, int iDelay);
|
||||
int MultiChanGetTimeout(pMultiChan unit);
|
||||
int MultiChanSetTimeout(pMultiChan unit, int timeout);
|
||||
|
||||
int MultiChanAction(SConnection *pCon, SicsInterp *pSics,
|
||||
void *pData, int argc, char *argv[]);
|
||||
#define MultiChanFactory AsyncQueueFactory
|
||||
#define MultiChanAction AsyncQueueAction
|
||||
|
||||
#endif /* SICSMULTICHAN */
|
||||
|
||||
Reference in New Issue
Block a user