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

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

Get a line from socket and store client hostname and port in port and host variable (with a timeout on listen).

size represente the number of byte to read

Definition at line 566 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, port, host, size);

Generated by  Doxygen 1.6.0   Back to index