Lines Matching defs:bytes
55 /** Listens for bytes coming from remote peers. */
56 typedef void BytesListener(Credentials credentials, char* bytes, size_t size);
72 /** A generic packet of bytes. */
83 /** Reading bytes. */
110 /** Buffer of bytes. Used with BYTES. */
111 Buffer* bytes;
460 /** Writes packet bytes to peer. */
462 Buffer* buffer = peerProxy->currentPacket->bytes;
580 /** Prepare to read bytes from the peer. */
582 ALOGD("Expecting %d bytes.", header->size);
980 ALOGD("Reading bytes...");
983 // We have the complete packet. Notify bytes listener.
1119 /** Frees a packet of bytes. */
1122 bufferFree(packet->bytes);
1127 * Sends a packet of bytes to a remote peer. Returns 0 on success.
1133 int peerSendBytes(pid_t pid, const char* bytes, size_t size) {
1151 memcpy(copy->data, bytes, size);
1154 packet->bytes = copy;
1158 bufferPrepareForWrite(packet->bytes);
1177 /** Keeps track of how to free shared bytes. */
1183 /** Frees shared bytes. */
1193 * Sends a packet of bytes to a remote peer without copying the bytes. Calls
1194 * free() with context after the bytes have been sent.
1200 int peerSendSharedBytes(pid_t pid, char* bytes, size_t size,
1211 Buffer* wrapper = bufferWrap(bytes, size, size);
1228 packet->bytes = wrapper;
1233 bufferPrepareForWrite(packet->bytes);