@@ -387,11 +387,11 @@ } } @catch (OFWriteFailedException *e) { return false; } - abort(); + OF_ENSURE(0); } - (bool)parseProlog: (OFString*)line { OFString *method; @@ -644,10 +644,12 @@ response: response]; } @end @implementation OFHTTPServer +@synthesize host = _host, port = _port, delegate = _delegate, name = _name; + + (instancetype)server { return [[[self alloc] init] autorelease]; } @@ -668,50 +670,10 @@ [_name release]; [super dealloc]; } -- (void)setHost: (OFString*)host -{ - OF_SETTER(_host, host, true, 1) -} - -- (OFString*)host -{ - OF_GETTER(_host, true) -} - -- (void)setPort: (uint16_t)port -{ - _port = port; -} - -- (uint16_t)port -{ - return _port; -} - -- (void)setDelegate: (id )delegate -{ - _delegate = delegate; -} - -- (id )delegate -{ - return _delegate; -} - -- (void)setName: (OFString*)name -{ - OF_SETTER(_name, name, true, 1) -} - -- (OFString*)name -{ - OF_GETTER(_name, true) -} - - (void)start { if (_host == nil) @throw [OFInvalidArgumentException exception];