Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
 public void set_log_callback(MongooseCallback func)
 {
     mg_set_log_callback(this.ctx, func);
 }
Ejemplo n.º 3
0
 public void set_log_callback(MongooseCallback func)
 {
     delegates1 += func;
     mg_set_log_callback(this.ctx, func);
 }
Ejemplo n.º 4
0
 public void set_log_callback(MongooseCallback func)
 {
     mg_set_log_callback(this.ctx, func);
 }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
0
	public void set_log_callback(MongooseCallback func) {
		delegates1 += func;
		mg_set_log_callback(this.ctx, func);
	}