public result_t unsubscribe(ushort mid) { try { result_t e = _unsubscribe(client_, mid); if (e == result_t.ERR_OK) { _forget_callback(mid); } return(e); } catch (Exception e) { Debug.Assert(false, "unsubscribe() threw exception.", e.ToString()); return(result_t.ERR_UNEXPECTED); } }
public result_t subscribe(ushort mid, int flags, uint mask, callback_string cb) { try { result_t e = _subscribe(client_, mid, flags, mask, cb); if (e == result_t.ERR_OK) { _remember_callback(mid, cb); } return(e); } catch (Exception e) { Debug.Assert(false, "subscribe() threw exception.", e.ToString()); return(result_t.ERR_UNEXPECTED); } }