zan-extension/src/factory/zanFactory.c
//close connection, and notify to worker.
//swReactorThread_onClose
close connection, and notify to worker.
close connection and notify to worker .
static int zanFactory_notify(zanFactory *factory, swDataHead *ev)
{
    zanNotify_data notify_data;
    if (!factory || !ev)
    {
        zanError("factory=%p or ev=%p is null", factory, ev);
        return ZAN_ERR;
    }
    memcpy(&notify_data._send, ev, sizeof(swDataHead));
    notify_data._send.len = 0;
    notify_data.target_worker_id = -1;
    return factory->dispatch(factory, (swDispatchData *) &notify_data);
}
static int zanFactory_notify ( zanFactory * factory , swDataHead * ev ) { zanNotify_data notify_data ; if ( ! factory || ! ev ) { zanError ( " " , factory , ev ) ; return ZAN_ERR ; } memcpy ( & notify_data . _send , ev , sizeof ( swDataHead ) ) ; notify_data . _send . len = 0 ; notify_data . target_worker_id = -1 ; return factory -> dispatch ( factory , ( swDispatchData * ) & notify_data ) ; }
close connection, and notify to worker.
close connection and notify to worker .