Author: rfm
Date: Sat Apr  5 12:49:53 2014
New Revision: 37786

URL: http://svn.gna.org/viewcvs/gnustep?rev=37786&view=rev
Log:
add accessors

Modified:
    libs/webserver/trunk/ChangeLog
    libs/webserver/trunk/WebServer.h
    libs/webserver/trunk/WebServer.m

Modified: libs/webserver/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webserver/trunk/ChangeLog?rev=37786&r1=37785&r2=37786&view=diff
==============================================================================
--- libs/webserver/trunk/ChangeLog      (original)
+++ libs/webserver/trunk/ChangeLog      Sat Apr  5 12:49:53 2014
@@ -1,3 +1,9 @@
+2014-04-05 Richard Frith-Macdonald  <[email protected]>
+
+       * WebServer.h:
+       * WebServer.m:
+       Add accessor methods -address and -port.
+
 2014-03-17 Richard Frith-Macdonald  <[email protected]>
 
        * WebServer.m: fix for bug 41887 ("T.Somequare" <[email protected]>)

Modified: libs/webserver/trunk/WebServer.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webserver/trunk/WebServer.h?rev=37786&r1=37785&r2=37786&view=diff
==============================================================================
--- libs/webserver/trunk/WebServer.h    (original)
+++ libs/webserver/trunk/WebServer.h    Sat Apr  5 12:49:53 2014
@@ -537,6 +537,11 @@
 - (BOOL) accessRequest: (WebServerRequest*)request
              response: (WebServerResponse*)response;
 
+/** Return the address the receiver listens for connections on, or nil
+ * if it is not listening.
+ */
+- (NSString*) address;
+
 /**
  * Instructs the server that the connection handlind the current request
  * should be closed once the response has been sent back to the client.
@@ -700,6 +705,11 @@
 - (NSString*) parameterString: (NSString*)name
                         from: (NSDictionary*)params
                      charset: (NSString*)charset;
+
+/** Return the port the receiver listens for connections on, or nil
+ * if it is not listening.
+ */
+- (NSString*) port;
 
 /**
  * Loads a template file from disk and places it in aResponse as content

Modified: libs/webserver/trunk/WebServer.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webserver/trunk/WebServer.m?rev=37786&r1=37785&r2=37786&view=diff
==============================================================================
--- libs/webserver/trunk/WebServer.m    (original)
+++ libs/webserver/trunk/WebServer.m    Sat Apr  5 12:49:53 2014
@@ -870,6 +870,16 @@
     }
 }
 
+- (NSString*) address
+{
+  NSString      *s;
+
+  [_lock lock];
+  s = [_addr retain];
+  [_lock unlock];
+  return [s autorelease];
+}
+
 - (void) closeConnectionAfter: (WebServerResponse*)response
 {
   [_lock lock];
@@ -1281,6 +1291,16 @@
                      charset: (NSString*)charset
 {
   return [self parameterString: name at: 0 from: params charset: charset];
+}
+
+- (NSString*) port
+{
+  NSString      *s;
+
+  [_lock lock];
+  s = [_port retain];
+  [_lock unlock];
+  return [s autorelease];
 }
 
 - (BOOL) setAddress: (NSString*)anAddress


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to