documentation fixes

This commit is contained in:
Marian Krivos
2012-07-31 05:47:28 +00:00
parent fe0ba56dc4
commit a31370fa55
5 changed files with 60 additions and 36 deletions

View File

@@ -76,16 +76,26 @@ public:
HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, const ServerSocket& socket, HTTPServerParams::Ptr pParams); HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, const ServerSocket& socket, HTTPServerParams::Ptr pParams);
/// Creates the HTTPServer, using the given ServerSocket. /// Creates the HTTPServer, using the given ServerSocket.
/// ///
/// New threads are taken from the default thread pool. /// The server takes ownership of the HTTPRequstHandlerFactory
/// and deletes it when it's no longer needed.
///
/// The server also takes ownership of the HTTPServerParams object.
///
/// News threads are taken from the default thread pool.
HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::ThreadPool& threadPool, const ServerSocket& socket, HTTPServerParams::Ptr pParams); HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::ThreadPool& threadPool, const ServerSocket& socket, HTTPServerParams::Ptr pParams);
/// Creates the HTTPServer, using the given ServerSocket. /// Creates the HTTPServer, using the given ServerSocket.
/// ///
/// New threads are taken from the given thread pool. /// The server takes ownership of the HTTPRequstHandlerFactory
/// and deletes it when it's no longer needed.
///
/// The server also takes ownership of the HTTPServerParams object.
///
/// News threads are taken from the given thread pool.
~HTTPServer(); ~HTTPServer();
/// Destroys the HTTPServer and its HTTPRequestHandlerFactory. /// Destroys the HTTPServer and its HTTPRequestHandlerFactory.
void stopAll(bool abortCurrent = false); void stopAll(bool abortCurrent = false);
/// Stops the server. In contrast to TCPServer::stop(), which also /// Stops the server. In contrast to TCPServer::stop(), which also
/// stops the server, but allows all client connections to finish at /// stops the server, but allows all client connections to finish at
@@ -95,7 +105,7 @@ public:
/// complete. If abortCurrent is false, the underlying sockets of /// complete. If abortCurrent is false, the underlying sockets of
/// all client connections are shut down, causing all requests /// all client connections are shut down, causing all requests
/// to abort. /// to abort.
private: private:
HTTPRequestHandlerFactory::Ptr _pFactory; HTTPRequestHandlerFactory::Ptr _pFactory;
}; };

View File

@@ -80,14 +80,14 @@ public:
~MulticastSocket(); ~MulticastSocket();
/// Destroys the DatagramSocket. /// Destroys the DatagramSocket.
MulticastSocket& operator = (const Socket& socket); MulticastSocket& operator =(const Socket& socket);
/// Assignment operator. /// Assignment operator.
/// ///
/// Releases the socket's SocketImpl and /// Releases the socket's SocketImpl and
/// attaches the SocketImpl from the other socket and /// attaches the SocketImpl from the other socket and
/// increments the reference count of the SocketImpl. /// increments the reference count of the SocketImpl.
void setInterface(const NetworkInterface& interfc); void setInterface(const NetworkInterface& interface);
/// Sets the interface used for sending multicast packets. /// Sets the interface used for sending multicast packets.
/// ///
/// To select the default interface, specify an empty /// To select the default interface, specify an empty
@@ -95,39 +95,39 @@ public:
/// ///
/// This is done by setting the IP_MULTICAST_IF/IPV6_MULTICAST_IF /// This is done by setting the IP_MULTICAST_IF/IPV6_MULTICAST_IF
/// socket option. /// socket option.
NetworkInterface getInterface() const; NetworkInterface getInterface() const;
/// Returns the interface used for sending multicast packets. /// Returns the interface used for sending multicast packets.
void setLoopback(bool flag); void setLoopback(bool flag);
/// Enable or disable loopback for multicast packets. /// Enable or disable loopback for multicast packets.
/// ///
/// Sets the value of the IP_MULTICAST_LOOP/IPV6_MULTICAST_LOOP /// Sets the value of the IP_MULTICAST_LOOP/IPV6_MULTICAST_LOOP
/// socket option. /// socket option.
bool getLoopback() const; bool getLoopback() const;
/// Returns true iff loopback for multicast packets is enabled, /// Returns true iff loopback for multicast packets is enabled,
/// false otherwise. /// false otherwise.
void setTimeToLive(unsigned value); void setTimeToLive(unsigned value);
/// Specifies the TTL/hop limit for outgoing packets. /// Specifies the TTL/hop limit for outgoing packets.
/// ///
/// Sets the value of the IP_MULTICAST_TTL/IPV6_MULTICAST_HOPS /// Sets the value of the IP_MULTICAST_TTL/IPV6_MULTICAST_HOPS
/// socket option. /// socket option.
unsigned getTimeToLive() const; unsigned getTimeToLive() const;
/// Returns the TTL/hop limit for outgoing packets. /// Returns the TTL/hop limit for outgoing packets.
void joinGroup(const IPAddress& groupAddress); void joinGroup(const IPAddress& groupAddress);
/// Joins the specified multicast group at the default interface. /// Joins the specified multicast group at the default interface.
void joinGroup(const IPAddress& groupAddress, const NetworkInterface& interfc); void joinGroup(const IPAddress& groupAddress, const NetworkInterface& interface);
/// Joins the specified multicast group at the given interface. /// Joins the specified multicast group at the given interface.
void leaveGroup(const IPAddress& groupAddress); void leaveGroup(const IPAddress& groupAddress);
/// Leaves the specified multicast group at the default interface. /// Leaves the specified multicast group at the default interface.
void leaveGroup(const IPAddress& groupAddress, const NetworkInterface& interfc); void leaveGroup(const IPAddress& groupAddress, const NetworkInterface& interface);
/// Leaves the specified multicast group at the given interface. /// Leaves the specified multicast group at the given interface.
}; };

View File

@@ -105,7 +105,7 @@ public:
/// ///
/// If reuseAddress is true, sets the SO_REUSEADDR /// If reuseAddress is true, sets the SO_REUSEADDR
/// socket option. /// socket option.
virtual void bind6(const SocketAddress& address, bool reuseAddress = false, bool ipV6Only = false); virtual void bind6(const SocketAddress& address, bool reuseAddress = false, bool ipV6Only = false);
/// Bind a local IPv6 address to the socket. /// Bind a local IPv6 address to the socket.
/// ///
@@ -122,7 +122,7 @@ public:
/// ///
/// If the library has not been built with IPv6 support, /// If the library has not been built with IPv6 support,
/// a Poco::NotImplementedException will be thrown. /// a Poco::NotImplementedException will be thrown.
virtual void listen(int backlog = 64); virtual void listen(int backlog = 64);
/// Puts the socket into listening state. /// Puts the socket into listening state.
/// ///
@@ -352,35 +352,37 @@ public:
virtual bool getBlocking() const; virtual bool getBlocking() const;
/// Returns the blocking mode of the socket. /// Returns the blocking mode of the socket.
/// This method will only work if the blocking modes of
/// the socket are changed via the setBlocking method!
virtual bool secure() const; virtual bool secure() const;
/// Returns true iff the socket's connection is secure /// Returns true iff the socket's connection is secure
/// (using SSL or TLS). /// (using SSL or TLS).
int socketError(); int socketError();
/// Returns the value of the SO_ERROR socket option. /// Returns the value of the SO_ERROR socket option.
poco_socket_t sockfd() const; poco_socket_t sockfd() const;
/// Returns the socket descriptor for the /// Returns the socket descriptor for the
/// underlying native socket. /// underlying native socket.
void ioctl(poco_ioctl_request_t request, int& arg); void ioctl(poco_ioctl_request_t request, int& arg);
/// A wrapper for the ioctl system call. /// A wrapper for the ioctl system call.
void ioctl(poco_ioctl_request_t request, void* arg); void ioctl(poco_ioctl_request_t request, void* arg);
/// A wrapper for the ioctl system call. /// A wrapper for the ioctl system call.
#if defined(POCO_OS_FAMILY_UNIX)
int fcntl(poco_fcntl_request_t request);
/// A wrapper for the fcntl system call.
int fcntl(poco_fcntl_request_t request, long arg); #if defined(POCO_OS_FAMILY_UNIX)
/// A wrapper for the fcntl system call. int fcntl(poco_fcntl_request_t request);
/// A wrapper for the fcntl system call.
int fcntl(poco_fcntl_request_t request, long arg);
/// A wrapper for the fcntl system call.
#endif #endif
bool initialized() const; bool initialized() const;
/// Returns true iff the underlying socket is initialized. /// Returns true iff the underlying socket is initialized.
protected: protected:
SocketImpl(); SocketImpl();
/// Creates a SocketImpl. /// Creates a SocketImpl.
@@ -418,7 +420,7 @@ protected:
void reset(poco_socket_t fd = POCO_INVALID_SOCKET); void reset(poco_socket_t fd = POCO_INVALID_SOCKET);
/// Allows subclasses to set the socket manually, iff no valid socket is set yet. /// Allows subclasses to set the socket manually, iff no valid socket is set yet.
static int lastError(); static int lastError();
/// Returns the last error code. /// Returns the last error code.

View File

@@ -101,6 +101,10 @@ public:
TCPServer(TCPServerConnectionFactory::Ptr pFactory, const ServerSocket& socket, TCPServerParams::Ptr pParams = 0); TCPServer(TCPServerConnectionFactory::Ptr pFactory, const ServerSocket& socket, TCPServerParams::Ptr pParams = 0);
/// Creates the TCPServer, using the given ServerSocket. /// Creates the TCPServer, using the given ServerSocket.
/// ///
/// The server takes ownership of the TCPServerConnectionFactory
/// and deletes it when it's no longer needed.
///
/// The server also takes ownership of the TCPServerParams object.
/// If no TCPServerParams object is given, the server's TCPServerDispatcher /// If no TCPServerParams object is given, the server's TCPServerDispatcher
/// creates its own one. /// creates its own one.
/// ///
@@ -109,6 +113,10 @@ public:
TCPServer(TCPServerConnectionFactory::Ptr pFactory, Poco::ThreadPool& threadPool, const ServerSocket& socket, TCPServerParams::Ptr pParams = 0); TCPServer(TCPServerConnectionFactory::Ptr pFactory, Poco::ThreadPool& threadPool, const ServerSocket& socket, TCPServerParams::Ptr pParams = 0);
/// Creates the TCPServer, using the given ServerSocket. /// Creates the TCPServer, using the given ServerSocket.
/// ///
/// The server takes ownership of the TCPServerConnectionFactory
/// and deletes it when it's no longer needed.
///
/// The server also takes ownership of the TCPServerParams object.
/// If no TCPServerParams object is given, the server's TCPServerDispatcher /// If no TCPServerParams object is given, the server's TCPServerDispatcher
/// creates its own one. /// creates its own one.
/// ///
@@ -116,11 +124,11 @@ public:
virtual ~TCPServer(); virtual ~TCPServer();
/// Destroys the TCPServer and its TCPServerConnectionFactory. /// Destroys the TCPServer and its TCPServerConnectionFactory.
const TCPServerParams& params() const; const TCPServerParams& params() const;
/// Returns a const reference to the TCPServerParam object /// Returns a const reference to the TCPServerParam object
/// used by the server's TCPServerDispatcher. /// used by the server's TCPServerDispatcher.
void start(); void start();
/// Starts the server. A new thread will be /// Starts the server. A new thread will be
/// created that waits for and accepts incoming /// created that waits for and accepts incoming
@@ -128,7 +136,7 @@ public:
/// ///
/// Before start() is called, the ServerSocket passed to /// Before start() is called, the ServerSocket passed to
/// TCPServer must have been bound and put into listening state. /// TCPServer must have been bound and put into listening state.
void stop(); void stop();
/// Stops the server. /// Stops the server.
/// ///

View File

@@ -61,10 +61,14 @@ class Net_API TCPServerDispatcher: public Poco::Runnable
public: public:
TCPServerDispatcher(TCPServerConnectionFactory::Ptr pFactory, Poco::ThreadPool& threadPool, TCPServerParams::Ptr pParams); TCPServerDispatcher(TCPServerConnectionFactory::Ptr pFactory, Poco::ThreadPool& threadPool, TCPServerParams::Ptr pParams);
/// Creates the TCPServerDispatcher. /// Creates the TCPServerDispatcher.
///
/// The dispatcher takes ownership of the TCPServerParams object.
/// If no TCPServerParams object is supplied, the TCPServerDispatcher
/// creates one.
void duplicate(); void duplicate();
/// Increments the object's reference count. /// Increments the object's reference count.
void release(); void release();
/// Decrements the object's reference count /// Decrements the object's reference count
/// and deletes the object if the count /// and deletes the object if the count