Browse Source

Fixed up cib's doxygen comments of some of the network classes

Ivan Safrin 12 years ago
parent
commit
e8cbd73094
2 changed files with 6 additions and 11 deletions
  1. 5 10
      Core/Contents/Include/PolyServer.h
  2. 1 1
      Core/Contents/Include/PolySocket.h

+ 5 - 10
Core/Contents/Include/PolyServer.h

@@ -76,16 +76,15 @@ namespace Polycode {
 	* As the Peer class already provides all connectivity functionality required, the Server class
 	* As the Peer class already provides all connectivity functionality required, the Server class
 	* merely provides another abstraction layer to treat clients separately from mere connections.
 	* merely provides another abstraction layer to treat clients separately from mere connections.
 	*
 	*
-	* The Server will process incoming packets N times per second, where N is an argument to the constructor.
-	* This means you can coordinate the server's reaction time to your program's internal timer.
+	* The Server will send the data provided by the ServerWorld class to all clients at defined rate and dispatch events when clients connect, disconnect and send data.
 	*/
 	*/
 	class _PolyExport Server : public Peer {
 	class _PolyExport Server : public Peer {
 		public:
 		public:
 			/**
 			/**
 			* Constructor.
 			* Constructor.
-			* @param port The port to listen for client connections on.
-			* @param rate How many times per second this instance should check for new incoming packets.
-			* @param world A singleton which manages the "world" this network server is attached to.
+			* @param port The local port to listen for client connections on.
+			* @param rate How many times per second to send out server data to clients.
+			* @param world An instance of the server data provider. @see ServerWorld
 			*/
 			*/
 			Server(unsigned int port, unsigned int rate, ServerWorld *world = NULL);
 			Server(unsigned int port, unsigned int rate, ServerWorld *world = NULL);
 			~Server();
 			~Server();
@@ -93,17 +92,13 @@ namespace Polycode {
 			void handlePacket(Packet *packet, PeerConnection *connection);
 			void handlePacket(Packet *packet, PeerConnection *connection);
 			void handleEvent(Event *event);	
 			void handleEvent(Event *event);	
 			void handlePeerConnection(PeerConnection *connection);
 			void handlePeerConnection(PeerConnection *connection);
-
-			/**
-			* Callback handler invoked when a client disconnects.
-			* @param client The client that disconnected.
-			*/
 			void DisconnectClient(ServerClient *client);
 			void DisconnectClient(ServerClient *client);
 
 
 			/**
 			/**
 			* Get a connected client from its associated peer connection, if any.
 			* Get a connected client from its associated peer connection, if any.
 			* @param connection The PeerConnection through which we're communicating 
 			* @param connection The PeerConnection through which we're communicating 
 			*                   with the client to obtain.
 			*                   with the client to obtain.
+			* @return The connected client or NULL if doesn't exist.
 			*/
 			*/
 			ServerClient *getConnectedClient(PeerConnection *connection);
 			ServerClient *getConnectedClient(PeerConnection *connection);
 		
 		

+ 1 - 1
Core/Contents/Include/PolySocket.h

@@ -69,7 +69,7 @@ namespace Polycode {
 		/**
 		/**
 		* Constructor.
 		* Constructor.
 		* @param ipAsString An IP address represented as string,
 		* @param ipAsString An IP address represented as string,
-		*                   for example "197.0.0.1"
+		*                   for example "127.0.0.1"
 		* @param port The UDP/TCP port of the address, given in
 		* @param port The UDP/TCP port of the address, given in
 		*             host byte order.
 		*             host byte order.
 		*/
 		*/