|  | @@ -227,9 +227,11 @@ class CIVETWEB_API CivetServer
 | 
											
												
													
														|  |  	 * @throws CivetException
 |  |  	 * @throws CivetException
 | 
											
												
													
														|  |  	 */
 |  |  	 */
 | 
											
												
													
														|  |  	CivetServer(const char **options,
 |  |  	CivetServer(const char **options,
 | 
											
												
													
														|  | -	            const struct CivetCallbacks *callbacks = 0);
 |  | 
 | 
											
												
													
														|  | 
 |  | +	            const struct CivetCallbacks *callbacks = 0,
 | 
											
												
													
														|  | 
 |  | +                    const void *UserContext = 0);
 | 
											
												
													
														|  |  	CivetServer(std::vector<std::string> options,
 |  |  	CivetServer(std::vector<std::string> options,
 | 
											
												
													
														|  | -	            const struct CivetCallbacks *callbacks = 0);
 |  | 
 | 
											
												
													
														|  | 
 |  | +	            const struct CivetCallbacks *callbacks = 0,
 | 
											
												
													
														|  | 
 |  | +                    const void *UserContext = 0);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  	/**
 |  |  	/**
 | 
											
												
													
														|  |  	 * Destructor
 |  |  	 * Destructor
 | 
											
										
											
												
													
														|  | @@ -532,8 +534,11 @@ class CIVETWEB_API CivetServer
 | 
											
												
													
														|  |  	                      bool append = false);
 |  |  	                      bool append = false);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          // generic user context which can be set/read,
 |  |          // generic user context which can be set/read,
 | 
											
												
													
														|  | -        // the server does noting with this apart form keep it.
 |  | 
 | 
											
												
													
														|  | -        void *UserContext;
 |  | 
 | 
											
												
													
														|  | 
 |  | +        // the server does nothing with this apart from keep it.
 | 
											
												
													
														|  | 
 |  | +	const void *getUserContext() const
 | 
											
												
													
														|  | 
 |  | +	{
 | 
											
												
													
														|  | 
 |  | +		return UserContext;
 | 
											
												
													
														|  | 
 |  | +	}
 | 
											
												
													
														|  |          
 |  |          
 | 
											
												
													
														|  |    protected:
 |  |    protected:
 | 
											
												
													
														|  |  	class CivetConnection
 |  |  	class CivetConnection
 | 
											
										
											
												
													
														|  | @@ -549,6 +554,10 @@ class CIVETWEB_API CivetServer
 | 
											
												
													
														|  |  	struct mg_context *context;
 |  |  	struct mg_context *context;
 | 
											
												
													
														|  |  	std::map<struct mg_connection *, class CivetConnection> connections;
 |  |  	std::map<struct mg_connection *, class CivetConnection> connections;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +        // generic user context which can be set/read,
 | 
											
												
													
														|  | 
 |  | +        // the server does nothing with this apart from keep it.
 | 
											
												
													
														|  | 
 |  | +        const void *UserContext;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |    private:
 |  |    private:
 | 
											
												
													
														|  |  	/**
 |  |  	/**
 | 
											
												
													
														|  |  	 * requestHandler(struct mg_connection *, void *cbdata)
 |  |  	 * requestHandler(struct mg_connection *, void *cbdata)
 |