static void s_Setup(SMetaConnector *meta, CONNECTOR connector) { SServiceConnector* uuu = (SServiceConnector*) connector->handle; /* initialize virtual table */ CONN_SET_DEFAULT_TIMEOUT(meta, uuu->net_info->timeout); CONN_SET_METHOD(meta, get_type, s_VT_GetType, connector); CONN_SET_METHOD(meta, open, s_VT_Open, connector); CONN_SET_METHOD(meta, close, s_VT_Close, connector); /* reset everything else */ s_Reset(meta, connector); }
static void s_Setup(SMetaConnector *meta, CONNECTOR connector) { SHttpConnector* uuu = (SHttpConnector*) connector->handle; /* initialize virtual table */ CONN_SET_METHOD(meta, get_type, s_VT_GetType, connector); CONN_SET_METHOD(meta, descr, s_VT_Descr, connector); CONN_SET_METHOD(meta, open, s_VT_Open, connector); CONN_SET_METHOD(meta, wait, s_VT_Wait, connector); CONN_SET_METHOD(meta, write, s_VT_Write, connector); CONN_SET_METHOD(meta, flush, s_VT_Flush, connector); CONN_SET_METHOD(meta, read, s_VT_Read, connector); CONN_SET_METHOD(meta, status, s_VT_Status, connector); CONN_SET_METHOD(meta, close, s_VT_Close, connector); #ifdef IMPLEMENTED__CONN_WaitAsync CONN_SET_METHOD(meta, wait_async, s_VT_WaitAsync, connector); #endif CONN_SET_DEFAULT_TIMEOUT(meta, uuu->net_info->timeout); }