Differences From Artifact [20ec2e1ce9]:
- File src/OFHTTPServer.h — part of check-in [7e5c81e186] at 2018-01-03 19:49:46 on branch trunk — Update copyright notice (user: js, size: 4225) [annotate] [blame] [check-ins using]
To Artifact [d45b5ef4ed]:
- File
src/OFHTTPServer.h
— part of check-in
[f756fb2ff6]
at
2018-02-25 02:38:40
on branch trunk
— OFHTTPServer: Move the body out of the request
Instead, provide a stream for the body to the callback. (user: js, size: 4351) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
19 20 21 22 23 24 25 | #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif OF_ASSUME_NONNULL_BEGIN | | | | > > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif OF_ASSUME_NONNULL_BEGIN @class OFHTTPRequest; @class OFHTTPResponse; @class OFHTTPServer; @class OFStream; @class OFTCPSocket; /*! * @protocol OFHTTPServerDelegate OFHTTPServer.h ObjFW/OFHTTPServer.h * * @brief A delegate for OFHTTPServer. */ @protocol OFHTTPServerDelegate <OFObject> /*! * @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 * @param body A stream to read the body of the request from, if any * @param response The response the server will send to the client */ - (void)server: (OFHTTPServer *)server didReceiveRequest: (OFHTTPRequest *)request body: (nullable OFStream *)body response: (OFHTTPResponse *)response; @optional /*! * @brief This method is called when the HTTP server's listening socket * encountered an exception. * |
︙ | ︙ |