Hi network experts,try to look at the imap implementation and have some questions to network connections. Never did something in this direction so maybe there is already something in the haiku tree that is useful but I'm not aware about it. So here my questions:
Is there any class that abstract a client- server connection using ssl / using a normal socket? An abstract class designed for it would do it too.
Furthermore, is there something like a class that establish a socket connection and read all data available at this socket into a buffer? For example, I like to send a command and don't know how many data I will get back.
If there is no such class whats the best way to read all available data? In case of ssl, SSL_pending returns the number of bytes in the queue. Whats about socket's? is there a performance difference between reading only one byte from a socket or multiple byte at one go? (the current imap client only reads one byte at a time till it found the stop byte) To read all available bytes, should I create a none blocking socket and read into a buffer till I get a EWOULDBLOCK? or does it also work with a blocking socket?