Logo Search packages:      
Sourcecode: libsocket version File versions  Download package

std::string Network::NetSocket::readn ( int  timeout,
unsigned int  size 
) [virtual, inherited]

read a string with a timeout

size represente the number of byte to read

Implements Network::Socket.

Definition at line 585 of file netsocket.cc.

References Network::NetSocket::_read_line_bin(), and Network::Socket::_set_timeout().

    if (!size || size > _buffer.size())
      _set_timeout(true, _socket, timeout);
    // _read_line_bin is bufferised with the same buffer as textual
    // protocols, so this function can be used for binary and text
    // protocols.
    return _read_line_bin(_socket, size);

Generated by  Doxygen 1.6.0   Back to index