Revision 707b9ed2 mongoose.h

View differences:

mongoose.h
3281 3281
     * void pointers, since some archs might have fat pointers for functions.
3282 3282
     */
3283 3283
    mg_event_handler_t f;
3284
  } priv_1;       /* Used by mg_enable_multithreading() */
3285
  void *priv_2;   /* Used by mg_enable_multithreading() */
3284
  } priv_1;
3285
  void *priv_2;
3286 3286
  void *mgr_data; /* Implementation-specific event manager's data. */
3287 3287
  struct mg_iface *iface;
3288 3288
  unsigned long flags;
......
3692 3692
 */
3693 3693
int mg_check_ip_acl(const char *acl, uint32_t remote_ip);
3694 3694

  
3695
/*
3696
 * Optional parameters for mg_enable_multithreading_opt()
3697
 */
3698
struct mg_multithreading_opts {
3699
  int poll_timeout; /* Polling interval */
3700
};
3701

  
3702
/*
3703
 * Enables multi-threaded handling for the given listening connection `nc`.
3704
 * For each accepted connection, Mongoose will create a separate thread
3705
 * and run an event handler in that thread. Thus, if an event handler is doing
3706
 * a blocking call or some long computation, it will not slow down
3707
 * other connections.
3708
 */
3709
void mg_enable_multithreading(struct mg_connection *nc);
3710
void mg_enable_multithreading_opt(struct mg_connection *nc,
3711
                                  struct mg_multithreading_opts opts);
3712

  
3713 3695
#if MG_ENABLE_JAVASCRIPT
3714 3696
/*
3715 3697
 * Enables server-side JavaScript scripting.

Also available in: Unified diff