changeset 130:da1c61aa97ea scope-refactoring

Added JUCE-compatible write method
author Giulio Moro <giuliomoro@yahoo.it>
date Tue, 25 Aug 2015 11:14:25 +0100
parents cce58e6ec2a2
children ff28e56e5b7e
files core/UdpClient.cpp include/UdpClient.h
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
+	}
 
--- 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);
 };