1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-22 01:34:21 +00:00

A handful of small fixes and whitespace clean-ups. Added a parameter to the DatagramSocket::read to specify whether the operation should block.

This commit is contained in:
jules 2009-04-17 14:05:04 +00:00
parent 0b1b03a324
commit 787a4e6de9
17 changed files with 1490 additions and 1469 deletions

View file

@ -289,7 +289,7 @@ bool InterprocessConnection::readNextMessageInt()
const int maximumMessageSize = 1024 * 1024 * 10; // sanity check
uint32 messageHeader[2];
const int bytes = (socket != 0) ? socket->read (messageHeader, sizeof (messageHeader))
const int bytes = (socket != 0) ? socket->read (messageHeader, sizeof (messageHeader), true)
: pipe->read (messageHeader, sizeof (messageHeader), pipeReceiveMessageTimeout);
if (bytes == sizeof (messageHeader)
@ -308,7 +308,7 @@ bool InterprocessConnection::readNextMessageInt()
return false;
const int numThisTime = jmin (bytesInMessage, 65536);
const int bytesIn = (socket != 0) ? socket->read (((char*) messageData.getData()) + bytesRead, numThisTime)
const int bytesIn = (socket != 0) ? socket->read (((char*) messageData.getData()) + bytesRead, numThisTime, true)
: pipe->read (((char*) messageData.getData()) + bytesRead, numThisTime,
pipeReceiveMessageTimeout);