summaryrefslogtreecommitdiff
path: root/src/tools/ocbr/ocbr_client.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2018-03-23 23:51:39 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2018-03-25 12:15:03 +0200
commit2975db4c62d9fba5cecc265ce794c7371f835953 (patch)
treefaef3b0607d6fcbebaffae55514fc68c483abf9a /src/tools/ocbr/ocbr_client.c
parente78740a4da0feb678f22bbc22b4c14a1f9a7bf7f (diff)
downloadouroboros-2975db4c62d9fba5cecc265ce794c7371f835953.tar.gz
ouroboros-2975db4c62d9fba5cecc265ce794c7371f835953.zip
tools: Increase read buffer in ocbr server
The ocbr server had a 1500 byte read buffer, which caused it to perform partial reads on larger SDUs, slowing it down considerably when sendin large packets. The buffer has been increased to 512KB, partial reads disabled, and the client will give an error when larger frames are sent. It will also warn if the size overflows (avoiding a SEGV). Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/tools/ocbr/ocbr_client.c')
-rw-r--r--src/tools/ocbr/ocbr_client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/ocbr/ocbr_client.c b/src/tools/ocbr/ocbr_client.c
index bf527317..026ab001 100644
--- a/src/tools/ocbr/ocbr_client.c
+++ b/src/tools/ocbr/ocbr_client.c
@@ -79,7 +79,7 @@ int client_main(char * server,
struct sigaction sig_act;
int fd = 0;
- char buf[size];
+ char buf[BUF_SIZE];
long seqnr = 0;
long gap = size * 8.0 * (BILLION / (double) rate);