Changeset 20989
- Timestamp:
- 01/10/08 07:51:47 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/trunk/modules/vapor/vpr/md/NSPR/IO/Socket/SocketImplNSPR.h
r20974 r20989 318 318 * @param length The number of bytes to be read. 319 319 * @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. 322 321 * 323 322 * @return The number of bytes read into the buffer is returned. 324 323 * 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. 331 334 */ 332 335 vpr::Uint32 read_i(void* buffer, const vpr::Uint32 length, 333 const vpr::Interval& timeout = vpr::Interval::NoTimeout);336 const vpr::Interval& timeout); 334 337 335 338 /** … … 347 350 * @param length The number of bytes to be read. 348 351 * @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. 351 353 * 352 354 * @return The number of bytes read into the buffer is returned. 353 355 * 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. 358 363 */ 359 364 vpr::Uint32 readn_i(void* buffer, const vpr::Uint32 length, 360 const vpr::Interval& timeout = vpr::Interval::NoTimeout);365 const vpr::Interval& timeout); 361 366 362 367 /** … … 371 376 * @param length The length of the buffer. 372 377 * @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. 375 379 * 376 380 * @return The number of bytes written to the device is returned. 377 381 * 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. 389 400 */ 390 401 vpr::Uint32 write_i(const void* buffer, const vpr::Uint32 length, 391 const vpr::Interval& timeout = vpr::Interval::NoTimeout);402 const vpr::Interval& timeout); 392 403 393 404 /** juggler/trunk/modules/vapor/vpr/md/POSIX/IO/Socket/SocketImplBSD.h
r20974 r20989 298 298 * @param length The number of bytes to be read. 299 299 * @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. 302 301 * 303 302 * @return The number of bytes read into the buffer is returned. 304 303 * 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. 311 314 */ 312 315 vpr::Uint32 read_i(void* buffer, const vpr::Uint32 length, 313 const vpr::Interval& timeout = vpr::Interval::NoTimeout);316 const vpr::Interval& timeout); 314 317 315 318 /** … … 327 330 * @param length The number of bytes to be read. 328 331 * @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. 331 333 * 332 334 * @return The number of bytes read into the buffer is returned. 333 335 * 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. 338 343 */ 339 344 vpr::Uint32 readn_i(void* buffer, const vpr::Uint32 length, 340 const vpr::Interval& timeout = vpr::Interval::NoTimeout);345 const vpr::Interval& timeout); 341 346 342 347 /** … … 346 351 * @pre The socket is open for writing. 347 352 * @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. 350 354 * 351 355 * @param buffer A pointer to the buffer to be written. 352 356 * @param length The length of the buffer. 353 357 * @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. 356 359 * 357 360 * @return The number of bytes written to the socket is returned. 358 361 * 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. 369 380 */ 370 381 vpr::Uint32 write_i(const void* buffer, const vpr::Uint32 length, 371 const vpr::Interval& timeout = vpr::Interval::NoTimeout);382 const vpr::Interval& timeout); 372 383 373 384 vpr::Uint32 availableBytes() const
