aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/libmmbackend.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-02-27 00:33:22 +0100
committercbdev <cb@cbcdn.com>2020-02-27 00:33:22 +0100
commite1fcd4d11cfdbad54470b2cce98d8b749464ec00 (patch)
tree1fc646402cca3934cd7fe87153a5f86fd9edf868 /backends/libmmbackend.c
parent1b3878956f02e274c480815774f9c6f39d65117f (diff)
downloadmidimonster-e1fcd4d11cfdbad54470b2cce98d8b749464ec00.tar.gz
midimonster-e1fcd4d11cfdbad54470b2cce98d8b749464ec00.tar.bz2
midimonster-e1fcd4d11cfdbad54470b2cce98d8b749464ec00.zip
Implement OpenPixelControl server mode (8bit)
Diffstat (limited to 'backends/libmmbackend.c')
-rw-r--r--backends/libmmbackend.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/libmmbackend.c b/backends/libmmbackend.c
index ffa403b..b9513ac 100644
--- a/backends/libmmbackend.c
+++ b/backends/libmmbackend.c
@@ -153,7 +153,11 @@ int mmbackend_socket(char* host, char* port, int socktype, uint8_t listener, uin
int mmbackend_send(int fd, uint8_t* data, size_t length){
ssize_t total = 0, sent;
while(total < length){
+ #ifndef LIBMMBACKEND_TCP_TORTURE
sent = send(fd, data + total, length - total, 0);
+ #else
+ sent = send(fd, data + total, 1, 0);
+ #endif
if(sent < 0){
LOGPF("Failed to send: %s", strerror(errno));
return 1;