Home | History | Annotate | Download | only in libcutils

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. */
73 BYTES,
83 /** Reading bytes. */
92 /** Packet size. Used for BYTES. */
110 /** Buffer of bytes. Used with BYTES. */
111 Buffer* bytes;
460 /** Writes packet bytes to peer. */
462 Buffer* buffer = peerProxy->currentPacket->bytes;
464 LOGD("Bytes written.");
544 case BYTES:
580 /** Prepare to read bytes from the peer. */
582 LOGD("Expecting %d bytes.", header->size);
928 case BYTES:
980 LOGD("Reading bytes...");
982 LOGD("Bytes read.");
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;
1155 packet->header.type = BYTES;
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;
1230 packet->header.type = BYTES;
1233 bufferPrepareForWrite(packet->bytes);