Lines Matching refs:bytes

103 #define SMALL_FILE_HEADER_SIZE    	(64)            /* 64 bytes    */
104 #define SMALL_FILE_TRAILER_SIZE (128) /* 128 bytes */
167 PRInt32 datalen; /* bytes of data transfered in each read/write */
174 PRInt32 datalen; /* bytes of data transfered in each read/write */
219 int bytes;
227 for (rem=len; rem; offset += bytes, rem -= bytes) {
228 DPRINTF(("thread = 0x%lx: calling PR_Recv, bytes = %d\n",
231 bytes = PR_Recv(sockfd, buf + offset, rem, 0,
233 DPRINTF(("thread = 0x%lx: returning from PR_Recv, bytes = %d\n",
234 PR_GetCurrentThread(), bytes));
235 if (bytes < 0) {
260 int bytes;
263 for (rem=len; rem; offset += bytes, rem -= bytes) {
264 DPRINTF(("thread = 0x%lx: calling PR_Send, bytes = %d\n",
266 bytes = PR_Send(sockfd, buf + offset, rem, 0,
268 DPRINTF(("thread = 0x%lx: returning from PR_Send, bytes = %d\n",
269 PR_GetCurrentThread(), bytes));
270 if (bytes <= 0)
288 PRInt32 bytes, j;
291 bytes = scp->datalen;
304 if (readn(sockfd, in_buf->data, bytes) < bytes) {
318 if (writen(sockfd, in_buf->data, bytes) < bytes) {
539 PRInt32 bytes, i, rv = 0;
542 bytes = sp->datalen;
606 bytes = sp->datalen;
619 DPRINTF(("UDP_Server: calling PR_RecvFrom client - ip = 0x%lx, port = %d bytes = %d inbuf = 0x%lx, inbuf[0] = 0x%lx\n",
620 netaddr.inet.ip, netaddr.inet.port, bytes, in_buf->data,
623 rv = PR_RecvFrom(sockfd, in_buf->data, bytes, 0, &netaddr,
625 DPRINTF(("UDP_Server: PR_RecvFrom client - ip = 0x%lx, port = %d bytes = %d inbuf = 0x%lx, inbuf[0] = 0x%lx\n",
628 if (rv != bytes) {
631 rv = PR_SendTo(sockfd, in_buf->data, bytes, 0, &netaddr,
633 if (rv != bytes) {
666 PRInt32 bytes, i, j;
669 bytes = cp->datalen;
700 memset(out_buf->data, ((PRInt32) (&netaddr)) + i + j, bytes);
708 if (writen(sockfd, out_buf->data, bytes) < bytes) {
715 if (readn(sockfd, in_buf->data, bytes) < bytes) {
723 if (memcmp(in_buf->data, out_buf->data, bytes) != 0) {
769 PRInt32 bytes, i, rv;
772 bytes = cp->datalen;
831 DPRINTF(("UDP_Client [0x%lx]: out_buf = 0x%lx bytes = 0x%lx\n",
832 PR_GetCurrentThread(), out_buf->data, bytes));
833 memset(out_buf->data, ((PRInt32) (&netaddr)) + i, bytes);
838 rv = PR_Send(sockfd, out_buf->data, bytes, 0,
841 rv = PR_SendTo(sockfd, out_buf->data, bytes, 0, &netaddr,
843 if (rv != bytes) {
849 rv = PR_Recv(sockfd, in_buf->data, bytes, 0,
852 rv = PR_RecvFrom(sockfd, in_buf->data, bytes, 0, &netaddr,
854 if (rv != bytes) {
862 if (memcmp(in_buf->data, out_buf->data, bytes) != 0) {
1493 PRInt32 bytes;
1516 bytes = PR_TransmitFile(sockfd, local_small_file_fd, small_file_header,
1519 if (bytes != (SMALL_FILE_SIZE+ SMALL_FILE_HEADER_SIZE)) {
1525 bytes = PR_TransmitFile(sockfd, local_large_file_fd, NULL, 0,
1527 if (bytes != LARGE_FILE_SIZE) {
1548 bytes = PR_SendFile(sockfd, &sfd, PR_TRANSMITFILE_KEEP_OPEN,
1552 if (bytes != slen) {
1554 "socket: Error - 1. PR_SendFile send_size = %d, bytes sent = %d\n",
1555 slen, bytes);
1572 bytes = PR_SendFile(sockfd, &sfd, PR_TRANSMITFILE_KEEP_OPEN,
1576 if (bytes != slen) {
1578 "socket: Error - 2. PR_SendFile send_size = %d, bytes sent = %d\n",
1579 slen, bytes);
1595 bytes = PR_SendFile(sockfd, &sfd, PR_TRANSMITFILE_KEEP_OPEN,
1598 if (bytes != slen) {
1600 "socket: Error - 3. PR_SendFile send_size = %d, bytes sent = %d\n",
1601 slen, bytes);
1617 bytes = PR_SendFile(sockfd, &sfd, PR_TRANSMITFILE_KEEP_OPEN,
1620 if (bytes != slen) {
1622 "socket: Error - 4. PR_SendFile send_size = %d, bytes sent = %d\n",
1623 slen, bytes);
1639 bytes = PR_SendFile(sockfd, &sfd, PR_TRANSMITFILE_KEEP_OPEN,
1642 if (bytes != slen) {
1644 "socket: Error - 5. PR_SendFile send_size = %d, bytes sent = %d\n",
1645 slen, bytes);
1661 bytes = PR_SendFile(sockfd, &sfd, PR_TRANSMITFILE_KEEP_OPEN,
1664 if (bytes != slen) {
1666 "socket: Error - 6. PR_SendFile send_size = %d, bytes sent = %d\n",
1667 slen, bytes);
1683 bytes = PR_SendFile(sockfd, &sfd, PR_TRANSMITFILE_KEEP_OPEN,
1686 if (bytes != slen) {
1688 "socket: Error - 7. PR_SendFile send_size = %d, bytes sent = %d\n",
1689 slen, bytes);
1706 bytes = PR_SendFile(sockfd, &sfd, PR_TRANSMITFILE_CLOSE_SOCKET,
1710 if (bytes != slen) {
1712 "socket: Error - 2. PR_SendFile send_size = %d, bytes sent = %d\n",
1713 slen, bytes);
1894 PRIntn i, rv = 0, bytes, count, len;
1948 bytes = PR_Write(small_file_fd, buf->data, len);
1949 if (bytes <= 0) {
1957 count += bytes;
2019 bytes = PR_Write(large_file_fd, buf->data, len);
2020 if (bytes <= 0) {
2029 count += bytes;