libcutils/mq.c
static bool peerProxyBufferInput(PeerProxy* peerProxy) {
    Buffer* in = peerProxy->inputBuffer;
    ssize_t size = bufferRead(in, peerProxy->fd->fd);
    if (size < 0) {
        peerProxyHandleError(peerProxy, "read");
        return false;
    } else if (size == 0) {
        // EOF.
    	LOGI("EOF");
        peerProxyKill(peerProxy, false);
        return false;
    } else if (bufferReadComplete(in)) {
        // We're done!
        return true;
    } else {
        // Continue reading.
        return false;
    }
}
/**
 * Buffers input sent by peer. May be called multiple times until the entire
 * buffer is filled. Returns true when the buffer is full.
 */
Buffers input sent by peer. May be called multiple times until the entire
buffer is filled. Returns true when the buffer is full.
Buffers input sent by peer . May be called multiple times until the entire buffer is filled . Returns true when the buffer is full .
static bool peerProxyBufferInput(PeerProxy* peerProxy) {
    Buffer* in = peerProxy->inputBuffer;
    ssize_t size = bufferRead(in, peerProxy->fd->fd);
    if (size < 0) {
        peerProxyHandleError(peerProxy, "read");
        return false;
    } else if (size == 0) {
    	LOGI("EOF");
        peerProxyKill(peerProxy, false);
        return false;
    } else if (bufferReadComplete(in)) {
        return true;
    } else {
        return false;
    }
}
static bool peerProxyBufferInput ( PeerProxy * peerProxy ) { Buffer * in = peerProxy -> inputBuffer ; ssize_t size = bufferRead ( in , peerProxy -> fd -> fd ) ; if ( size < 0 ) { peerProxyHandleError ( peerProxy , " " ) ; return false ; } else if ( size == 0 ) { LOGI ( " " ) ; peerProxyKill ( peerProxy , false ) ; return false ; } else if ( bufferReadComplete ( in ) ) { return true ; } else { return false ; } }
Buffers input sent by peer.
Buffers input sent by peer .
// EOF. // We're done! // Continue reading.