예제 #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);
    }
예제 #2
0
 public void set_log_callback(MongooseCallback func)
 {
     mg_set_log_callback(this.ctx, func);
 }
예제 #3
0
 public void set_log_callback(MongooseCallback func)
 {
     delegates1 += func;
     mg_set_log_callback(this.ctx, func);
 }
예제 #4
0
 public void set_log_callback(MongooseCallback func)
 {
     mg_set_log_callback(this.ctx, func);
 }
예제 #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);
 }
예제 #6
0
	public void set_log_callback(MongooseCallback func) {
		delegates1 += func;
		mg_set_log_callback(this.ctx, func);
	}