Changeset 20990

Show
Ignore:
Timestamp:
01/10/08 08:04:03 (8 months ago)
Author:
patrick
Message:

Improve comments, remove the default value for the timeout parameter on
sendto() and recvfrom(), and pass the vpr::Interval objects by const
reference instead of const copy.

Files:

Legend:

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

    r20974 r20990  
    8181                                             const vpr::Uint32 length, 
    8282                                             vpr::InetAddr& from, 
    83                                              const vpr::Interval timeout) 
     83                                             const vpr::Interval& timeout) 
    8484{ 
    8585   vpr::Uint32 bytes_read(0); 
     
    174174                                           const vpr::Uint32 length, 
    175175                                           const vpr::InetAddr& to, 
    176                                            const vpr::Interval timeout) 
     176                                           const vpr::Interval& timeout) 
    177177{ 
    178178   vpr::Uint32 bytes_sent(0); 
  • juggler/trunk/modules/vapor/vpr/md/NSPR/IO/Socket/SocketDatagramImplNSPR.h

    r20974 r20990  
    8989    * @return The number of bytes read into the buffer is returned. 
    9090    * 
    91     * @throws vpr::SocketException     If the socket is not connected. 
    92     * @throws vpr::WouldBlockException If the file is in non-blocking mode, 
    93     *                                  and there is no data to read. 
    94     * @throws vpr::TimeoutException    If the read could not begin within the 
    95     *                                  timeout interval. 
    96     * @throws vpr::IOException         If the read operation failed. 
     91    * @throw vpr::WouldBlockException 
     92    *           Thrown if the file is in non-blocking mode, and there is no 
     93    *           data to read. 
     94    * @throw vpr::TimeoutException 
     95    *           Thrown if the read could not begin within the timeout 
     96    *           interval. 
     97    * @throw vpr::SocketException 
     98    *           Thrown if the read operation failed. 
    9799    */ 
    98100   vpr::Uint32 recvfrom(void* msg, const vpr::Uint32 length, 
    99                         vpr::InetAddr& from, 
    100                         const vpr::Interval timeout = vpr::Interval::NoTimeout); 
     101                        vpr::InetAddr& from, const vpr::Interval& timeout); 
    101102 
    102103   /** 
     
    104105    * 
    105106    * @return The number of bytes written to the socket is returned. 
     107    * 
     108    * @throw vpr::ConnectionResetException 
     109    *           Thrown if connection is reset. 
     110    * @throw vpr::NoRouteToHostException 
     111    *           Thrown if a route to host does not exist. 
     112    * @throw vpr::UnknownHostException 
     113    *           Thrown if host does not exist. 
     114    * @throw vpr::IOException 
     115    *           Thrown if the network is down. 
     116    * @throw vpr::WouldBlockException 
     117    *           Thrown if the handle is in non-blocking mode, and the send 
     118    *           operation could not be completed. 
     119    * @throw vpr::TimeoutException 
     120    *           Thrown if the send could not begin within the timeout 
     121    *           interval. 
     122    * @throw vpr::SocketException 
     123    *           Thrown if the send operation failed. 
     124    * @throw vpr::IOException 
     125    *           Thrown if the file handle write operation failed. 
    106126    */ 
    107127   vpr::Uint32 sendto(const void* msg, const vpr::Uint32 length, 
    108                       const vpr::InetAddr& to, 
    109                       const vpr::Interval timeout = vpr::Interval::NoTimeout); 
     128                      const vpr::InetAddr& to, const vpr::Interval& timeout); 
    110129}; 
    111130 
  • juggler/trunk/modules/vapor/vpr/md/POSIX/IO/Socket/SocketDatagramImplBSD.cpp

    r20974 r20990  
    8686                                            const vpr::Uint32 length, 
    8787                                            vpr::InetAddr& from, 
    88                                             const vpr::Interval timeout) 
     88                                            const vpr::Interval& timeout) 
    8989{ 
    9090   vpr::Uint32 bytes_read(0); 
     
    143143                                          const vpr::Uint32 length, 
    144144                                          const vpr::InetAddr& to, 
    145                                           const vpr::Interval timeout) 
     145                                          const vpr::Interval& timeout) 
    146146{ 
    147147   vpr::Uint32 bytes_sent(0); 
  • juggler/trunk/modules/vapor/vpr/md/POSIX/IO/Socket/SocketDatagramImplBSD.h

    r20974 r20990  
    9595    * @return The number of bytes read into the buffer is returned. 
    9696    * 
    97     * @throws vpr::SocketException if the socket is not connected. 
    98     * @throws vpr::WouldBlockException if the file is in non-blocking mode, 
    99     *         and there is no data to read. 
    100     * @throws vpr::TimeoutException if the read could not begin within the 
    101     *         timeout interval. 
    102     * @throws vpr::IOException if the read operation failed. 
     97    * @throw vpr::WouldBlockException 
     98    *           Thrown if the file is in non-blocking mode, and there is no 
     99    *           data to read. 
     100    * @throw vpr::TimeoutException 
     101    *           Thrown if the read could not begin within the timeout 
     102    *           interval. 
     103    * @throw vpr::SocketException 
     104    *           Thrown if the read operation failed. 
    103105    */ 
    104106   vpr::Uint32 recvfrom(void* msg, const vpr::Uint32 length, 
    105                         vpr::InetAddr& from, 
    106                         const vpr::Interval timeout = vpr::Interval::NoTimeout); 
     107                        vpr::InetAddr& from, const vpr::Interval& timeout); 
    107108 
    108109   /** 
     
    110111    * 
    111112    * @return The number of bytes written to the socket is returned. 
     113    * 
     114    * @throw vpr::ConnectionResetException 
     115    *           Thrown if connection is reset. 
     116    * @throw vpr::NoRouteToHostException 
     117    *           Thrown if a route to host does not exist. 
     118    * @throw vpr::UnknownHostException 
     119    *           Thrown if host does not exist. 
     120    * @throw vpr::IOException 
     121    *           Thrown if the network is down. 
     122    * @throw vpr::WouldBlockException 
     123    *           Thrown if the handle is in non-blocking mode, and the send 
     124    *           operation could not be completed. 
     125    * @throw vpr::TimeoutException 
     126    *           Thrown if the send could not begin within the timeout 
     127    *           interval. 
     128    * @throw vpr::SocketException 
     129    *           Thrown if the send operation failed. 
     130    * @throw vpr::IOException 
     131    *           Thrown if the file handle write operation failed. 
    112132    */ 
    113133   vpr::Uint32 sendto(const void* msg, const vpr::Uint32 length, 
    114                       const vpr::InetAddr& to, 
    115                       const vpr::Interval timeout = vpr::Interval::NoTimeout); 
     134                      const vpr::InetAddr& to, const vpr::Interval& timeout); 
    116135}; 
    117136