Changeset 20989

Show
Ignore:
Timestamp:
01/10/08 07:51:47 (8 months ago)
Author:
patrick
Message:

Improve comments. Removed the default value for the timeout paramter to the
read/write methods as it is not helpful in the current way of doing things.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/vapor/vpr/md/NSPR/IO/Socket/SocketImplNSPR.h

    r20974 r20989  
    318318    * @param length  The number of bytes to be read. 
    319319    * @param timeout The maximum amount of time to wait for data to be 
    320     *                available for reading.  This argument is optional and 
    321     *                defaults to vpr::Interval::NoTimeout. 
     320    *                available for reading. 
    322321    * 
    323322    * @return The number of bytes read into the buffer is returned. 
    324323    * 
    325     * @throw vpr::SocketException     If this socket is not connected. 
    326     * @throw vpr::WouldBlockException If the file is in non-blocking mode, 
    327     *                                 and there is no data to read. 
    328     * @throw vpr::TimeoutException    If the read could not begin within the 
    329     *                                 timeout interval. 
    330     * @throw vpr::IOException         If the read operation failed. 
     324    * @throw vpr::SocketException 
     325    *           Thrown if this socket is not connected. 
     326    * @throw vpr::WouldBlockException 
     327    *           Thrown if the file is in non-blocking mode, and there is no 
     328    *           data to read. 
     329    * @throw vpr::TimeoutException 
     330    *           Thrown if the read could not begin within the timeout 
     331    *           interval. 
     332    * @throw vpr::IOException 
     333    *           Thrown if the read operation failed. 
    331334    */ 
    332335   vpr::Uint32 read_i(void* buffer, const vpr::Uint32 length, 
    333                       const vpr::Interval& timeout = vpr::Interval::NoTimeout); 
     336                      const vpr::Interval& timeout); 
    334337 
    335338   /** 
     
    347350    * @param length  The number of bytes to be read. 
    348351    * @param timeout The maximum amount of time to wait for data to be 
    349     *                available for reading.  This argument is optional and 
    350     *                defaults to vpr::Interval::NoTimeout. 
     352    *                available for reading. 
    351353    * 
    352354    * @return The number of bytes read into the buffer is returned. 
    353355    * 
    354     * @throw vpr::SocketException If this socket is not connected. 
    355     * @throw vpr::EOFException    If end of file or end of stream has been 
    356     *                             reached unexpectedly during input. 
    357     * @throw vpr::IOException     If an error ocured while reading. 
     356    * @throw vpr::SocketException 
     357    *           Thrown if this socket is not connected. 
     358    * @throw vpr::EOFException 
     359    *           Thrown if end of file or end of stream has been reached 
     360    *           unexpectedly during input. 
     361    * @throw vpr::IOException 
     362    *           Thrown if an error ocured while reading. 
    358363    */ 
    359364   vpr::Uint32 readn_i(void* buffer, const vpr::Uint32 length, 
    360                        const vpr::Interval& timeout = vpr::Interval::NoTimeout); 
     365                       const vpr::Interval& timeout); 
    361366 
    362367   /** 
     
    371376    * @param length  The length of the buffer. 
    372377    * @param timeout The maximum amount of time to wait for data to be 
    373     *                available for writing.  This argument is optional and 
    374     *                defaults to vpr::Interval::NoTimeout. 
     378    *                available for writing. 
    375379    * 
    376380    * @return The number of bytes written to the device is returned. 
    377381    * 
    378     * @throw ConnectionResetException If connection is reset. 
    379     * @throw NoRouteToHostException   If a route to host does not exist. 
    380     * @throw UnknownHostException     If host does not exist. 
    381     * @throw IOException              If network is down. 
    382     * @throw vpr::WouldBlockException If the socket is in non-blocking mode, 
    383     *                                 and the write operation could not be 
    384     *                                 completed. 
    385     * @throw vpr::TimeoutException    If the write could not begin within the 
    386     *                                 timeout interval. 
    387     * @throw vpr::SocketException     If the write operation failed. 
    388     * @throw vpr::IOException         If the socket write operation failed. 
     382    * @throw vpr::ConnectionResetException 
     383    *           Thrown if connection is reset. 
     384    * @throw vpr::NoRouteToHostException 
     385    *           Thrown if a route to host does not exist. 
     386    * @throw vpr::UnknownHostException 
     387    *           Thrown if host does not exist. 
     388    * @throw vpr::IOException 
     389    *           Thrown if network is down. 
     390    * @throw vpr::WouldBlockException 
     391    *           Thrown if the socket is in non-blocking mode, and the write 
     392    *           operation could not be completed. 
     393    * @throw vpr::TimeoutException 
     394    *           Thrown if the write could not begin within the timeout 
     395    *           interval. 
     396    * @throw vpr::SocketException 
     397    *           Thrown if the write operation failed. 
     398    * @throw vpr::IOException 
     399    *           Thrown if the socket write operation failed. 
    389400    */ 
    390401   vpr::Uint32 write_i(const void* buffer, const vpr::Uint32 length, 
    391                        const vpr::Interval& timeout = vpr::Interval::NoTimeout); 
     402                       const vpr::Interval& timeout); 
    392403 
    393404   /** 
  • juggler/trunk/modules/vapor/vpr/md/POSIX/IO/Socket/SocketImplBSD.h

    r20974 r20989  
    298298    * @param length  The number of bytes to be read. 
    299299    * @param timeout The maximum amount of time to wait for data to be 
    300     *                available for reading.  This argument is optional and 
    301     *                defaults to vpr::Interval::NoTimeout. 
     300    *                available for reading. 
    302301    * 
    303302    * @return The number of bytes read into the buffer is returned. 
    304303    * 
    305     * @throws vpr::SocketException if the socket is not connected. 
    306     * @throws vpr::WouldBlockException if the file is in non-blocking mode, 
    307     *         and there is no data to read. 
    308     * @throws vpr::TimeoutException if the read could not begin within the 
    309     *         timeout interval. 
    310     * @throws vpr::IOException if the read operation failed. 
     304    * @throw vpr::SocketException 
     305    *           Thrown if the socket is not connected. 
     306    * @throw vpr::WouldBlockException 
     307    *           Thrown if the file is in non-blocking mode, and there is no 
     308    *           data to read. 
     309    * @throw vpr::TimeoutException 
     310    *           Thrown if the read could not begin within the timeout 
     311    *           interval. 
     312    * @throw vpr::IOException 
     313    *           Thrown if the read operation failed. 
    311314    */ 
    312315   vpr::Uint32 read_i(void* buffer, const vpr::Uint32 length, 
    313                       const vpr::Interval& timeout = vpr::Interval::NoTimeout); 
     316                      const vpr::Interval& timeout); 
    314317 
    315318   /** 
     
    327330    * @param length  The number of bytes to be read. 
    328331    * @param timeout The maximum amount of time to wait for data to be 
    329     *                available for reading.  This argument is optional and 
    330     *                defaults to vpr::Interval::NoTimeout. 
     332    *                available for reading. 
    331333    * 
    332334    * @return The number of bytes read into the buffer is returned. 
    333335    * 
    334     * @throws vpr::SocketException if socket is not connected. 
    335     * @throws vpr::EOFException if end of file or end of stream has been 
    336     *         reached unexpectedly during input. 
    337     * @throws vpr::IOException if an error ocured while reading. 
     336    * @throw vpr::SocketException 
     337    *           Thrown if socket is not connected. 
     338    * @throw vpr::EOFException 
     339    *           Thrown if end of file or end of stream has been reached 
     340    *           unexpectedly during input. 
     341    * @throw vpr::IOException 
     342    *           Thrown if an error ocured while reading. 
    338343    */ 
    339344   vpr::Uint32 readn_i(void* buffer, const vpr::Uint32 length, 
    340                        const vpr::Interval& timeout = vpr::Interval::NoTimeout); 
     345                       const vpr::Interval& timeout); 
    341346 
    342347   /** 
     
    346351    * @pre The socket is open for writing. 
    347352    * @post The given buffer is written to the I/O socket, and the number 
    348     *       of bytes written successfully is returned to the caller via the 
    349     *       \p bytesWritten parameter. 
     353    *       of bytes written successfully is returned to the caller. 
    350354    * 
    351355    * @param buffer  A pointer to the buffer to be written. 
    352356    * @param length  The length of the buffer. 
    353357    * @param timeout The maximum amount of time to wait for data to be 
    354     *                available for writing.  This argument is optional and 
    355     *                defaults to vpr::Interval::NoTimeout. 
     358    *                available for writing. 
    356359    * 
    357360    * @return The number of bytes written to the socket is returned. 
    358361    * 
    359     * @throws ConnectionResetException if connection is reset. 
    360     * @throws NoRouteToHostException if a route to host does not exist. 
    361     * @throws UnknownHostException if host does not exist. 
    362     * @throws IOException if network is down. 
    363     * @throws vpr::WouldBlockException if the handle is in non-blocking mode, 
    364     *         and the write operation could not be completed. 
    365     * @throws vpr::TimeoutException if the write could not begin within the 
    366     *         timeout interval. 
    367     * @throws vpr::SocketException if the write operation failed. 
    368     * @throws vpr::IOException if the file handle write operation failed. 
     362    * @throw vpr::ConnectionResetException 
     363    *           Thrown if connection is reset. 
     364    * @throw vpr::NoRouteToHostException 
     365    *           Thrown if a route to host does not exist. 
     366    * @throw vpr::UnknownHostException 
     367    *           Thrown if host does not exist. 
     368    * @throw vpr::IOException 
     369    *           Thrown if the network is down. 
     370    * @throw vpr::WouldBlockException 
     371    *           Thrown if the handle is in non-blocking mode, and the write 
     372    *           operation could not be completed. 
     373    * @throw vpr::TimeoutException 
     374    *           Thrown if the write could not begin within the timeout 
     375    *           interval. 
     376    * @throw vpr::SocketException 
     377    *           Thrown if the write operation failed. 
     378    * @throw vpr::IOException 
     379    *           Thrown if the file handle write operation failed. 
    369380    */ 
    370381   vpr::Uint32 write_i(const void* buffer, const vpr::Uint32 length, 
    371                        const vpr::Interval& timeout = vpr::Interval::NoTimeout); 
     382                       const vpr::Interval& timeout); 
    372383 
    373384   vpr::Uint32 availableBytes() const