@@ -28,17 +28,17 @@ @class OFHTTPResponse; @class OFHTTPServer; @class OFStream; @class OFTCPSocket; -/*! +/** * @protocol OFHTTPServerDelegate OFHTTPServer.h ObjFW/OFHTTPServer.h * * @brief A delegate for OFHTTPServer. */ @protocol OFHTTPServerDelegate -/*! +/** * @brief This method is called when the HTTP server received a request from a * client. * * @param server The HTTP server which received the request * @param request The request the HTTP server received @@ -49,11 +49,11 @@ didReceiveRequest: (OFHTTPRequest *)request requestBody: (nullable OFStream *)requestBody response: (OFHTTPResponse *)response; @optional -/*! +/** * @brief This method is called when the HTTP server's listening socket * encountered an exception. * * @param server The HTTP server which encountered an exception * @param exception The exception which occurred on the HTTP server's listening @@ -63,11 +63,11 @@ * connections again by calling @ref OFHTTPServer::start again. */ - (bool)server: (OFHTTPServer *)server didReceiveExceptionOnListeningSocket: (id)exception; -/*! +/** * @brief This method is called when a client socket encountered an exception. * * This can happen when the OFHTTPServer tries to properly close the * connection. If no headers have been sent yet, it will send headers, and if * chunked transfer encoding was used, it will send a chunk of size 0. However, @@ -83,11 +83,11 @@ didReceiveExceptionForResponse: (OFHTTPResponse *)response request: (OFHTTPRequest *)request exception: (id)exception; @end -/*! +/** * @class OFHTTPServer OFHTTPServer.h ObjFW/OFHTTPServer.h * * @brief A class for creating a simple HTTP server inside of applications. */ OF_SUBCLASSING_RESTRICTED @@ -105,51 +105,51 @@ size_t _numberOfThreads, _nextThreadIndex; OFArray *_threadPool; #endif } -/*! +/** * @brief The host on which the HTTP server will listen. * * Setting this after @ref start has been called raises an * @ref OFAlreadyConnectedException. */ @property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *host; -/*! +/** * @brief The port on which the HTTP server will listen. * * Setting this after @ref start has been called raises an * @ref OFAlreadyConnectedException. */ @property (nonatomic) uint16_t port; -/*! +/** * @brief Whether the HTTP server uses TLS. * * Setting this after @ref start has been called raises an * @ref OFAlreadyConnectedException. */ @property (nonatomic) bool usesTLS; -/*! +/** * @brief The path to the X.509 certificate file to use for TLS. * * Setting this after @ref start has been called raises an * @ref OFAlreadyConnectedException. */ @property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *certificateFile; -/*! +/** * @brief The path to the PKCS#8 private key file to use for TLS. * * Setting this after @ref start has been called raises an * @ref OFAlreadyConnectedException. */ @property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *privateKeyFile; -/*! +/** * @brief The passphrase to decrypt the PKCS#8 private key file for TLS. * * @warning You have to ensure that this is in secure memory protected from * swapping! This is also the reason why this is not an OFString. * @@ -157,18 +157,18 @@ * @ref OFAlreadyConnectedException. */ @property OF_NULLABLE_PROPERTY (assign, nonatomic) const char *privateKeyPassphrase; -/*! +/** * @brief The delegate for the HTTP server. */ @property OF_NULLABLE_PROPERTY (assign, nonatomic) id delegate; #ifdef OF_HAVE_THREADS -/*! +/** * @brief The number of threads the OFHTTPServer should use. * * If this is larger than 1 (the default), one thread will be used to accept * incoming connections and all others will be used to handle connections. * @@ -178,34 +178,34 @@ * @ref OFAlreadyConnectedException. */ @property (nonatomic) size_t numberOfThreads; #endif -/*! +/** * @brief The server name the server presents to clients. * * Setting it to `nil` means no `Server` header will be sent, unless one is * specified in the response headers. */ @property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *name; -/*! +/** * @brief Creates a new HTTP server. * * @return A new HTTP server */ + (instancetype)server; -/*! +/** * @brief Starts the HTTP server in the current thread's run loop. */ - (void)start; -/*! +/** * @brief Stops the HTTP server, meaning it will not accept any new incoming * connections, but still handle existing connections until they are * finished or timed out. */ - (void)stop; @end OF_ASSUME_NONNULL_END