public void set_uri_callback(string uri_regex, MongooseCallback func) { // Build a closure around user function. Initialize connection object there which wraps // mg_write() and other useful methods, and then call user specified handler. MongooseCallback2 callback = delegate(IntPtr conn, ref MongooseRequestInfo ri, IntPtr user_data) { MongooseConnection connection = new MongooseConnection(conn, this); func(connection, ri); }; mg_set_uri_callback(this.ctx, uri_regex, callback, IntPtr.Zero); }
public void set_log_callback(MongooseCallback func) { mg_set_log_callback(this.ctx, func); }
public void set_log_callback(MongooseCallback func) { delegates1 += func; mg_set_log_callback(this.ctx, func); }