ObjFW  Diff

Differences From Artifact [551f28751a]:

To Artifact [d43ccf4c58]:


45
46
47
48
49
50
51

52
53
54
55
56
57
58

59
60
61
62
63
64
65
 * @brief A class for creating a simple HTTP server inside of applications.
 */
@interface OFHTTPServer: OFObject
{
	OFString *host;
	uint16_t port;
	id <OFHTTPServerDelegate> delegate;

	OFTCPSocket *listeningSocket;
}

#ifdef OF_HAVE_PROPERTIES
@property (copy) OFString *host;
@property uint16_t port;
@property (assign) id <OFHTTPServerDelegate> delegate;

#endif

/*!
 * @brief Creates a new HTTP server.
 *
 * @return A new HTTP server
 */







>







>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
 * @brief A class for creating a simple HTTP server inside of applications.
 */
@interface OFHTTPServer: OFObject
{
	OFString *host;
	uint16_t port;
	id <OFHTTPServerDelegate> delegate;
	OFString *name;
	OFTCPSocket *listeningSocket;
}

#ifdef OF_HAVE_PROPERTIES
@property (copy) OFString *host;
@property uint16_t port;
@property (assign) id <OFHTTPServerDelegate> delegate;
@property (copy) OFString *name;
#endif

/*!
 * @brief Creates a new HTTP server.
 *
 * @return A new HTTP server
 */
103
104
105
106
107
108
109














110
111
112
113
114
115
116
117
118
119
120
121
/*!
 * @brief Returns the delegate for the HTTP server.
 *
 * @return The delegate for the HTTP server
 */
- (id <OFHTTPServerDelegate>)delegate;















/*!
 * @brief Starts the HTTP server in the current thread's runloop.
 */
- (void)start;

- (BOOL)OF_socket: (OFTCPSocket*)socket
  didAcceptSocket: (OFTCPSocket*)clientSocket
	exception: (OFException*)exception;
@end

@interface OFObject (OFHTTPServerDelegate) <OFHTTPServerDelegate>
@end







>
>
>
>
>
>
>
>
>
>
>
>
>
>












105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/*!
 * @brief Returns the delegate for the HTTP server.
 *
 * @return The delegate for the HTTP server
 */
- (id <OFHTTPServerDelegate>)delegate;

/*!
 * @brief Sets the server name the server presents to clients.
 *
 * @param name The server name to present to clients
 */
- (void)setName: (OFString*)name;

/*!
 * @brief Returns the server name the server presents to clients.
 *
 * @return The server name the server presents to clients
 */
- (OFString*)name;

/*!
 * @brief Starts the HTTP server in the current thread's runloop.
 */
- (void)start;

- (BOOL)OF_socket: (OFTCPSocket*)socket
  didAcceptSocket: (OFTCPSocket*)clientSocket
	exception: (OFException*)exception;
@end

@interface OFObject (OFHTTPServerDelegate) <OFHTTPServerDelegate>
@end