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:
parent
0b1b03a324
commit
787a4e6de9
17 changed files with 1490 additions and 1469 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue