# HG changeset patch # User Giulio Moro # Date 1440497665 -3600 # Node ID da1c61aa97eac62035ebcb650883ce42c65d68a5 # Parent cce58e6ec2a2ae42f35fef271383c5948be90521 Added JUCE-compatible write method diff -r cce58e6ec2a2 -r da1c61aa97ea core/UdpClient.cpp --- a/core/UdpClient.cpp Mon Aug 24 20:53:26 2015 +0100 +++ b/core/UdpClient.cpp Tue Aug 25 11:14:25 2015 +0100 @@ -54,4 +54,9 @@ } return 1; }; + int UdpClient::write(const char* remoteHostname, int remotePortNumber, void* sourceBuffer, int numBytesToWrite){ + setServer(remoteHostname); + setPort(remotePortNumber); + send(sourceBuffer, numBytesToWrite); + } diff -r cce58e6ec2a2 -r da1c61aa97ea include/UdpClient.h --- a/include/UdpClient.h Mon Aug 24 20:53:26 2015 +0100 +++ b/include/UdpClient.h Tue Aug 25 11:14:25 2015 +0100 @@ -33,6 +33,7 @@ void setPort(int aPort); void setServer(const char* aServerName); int send(void* message, int size); + int write(const char* remoteHostname, int remotePortNumber, void* sourceBuffer, int numBytesToWrite); };