put new socksend() into production

FIX #902.

Performance improvements LAN (just one shot):

```
	58 / 50
	52 / 44
	53 / 47
	143 / 137
	63 / 53
	48 / 43
```

WAN:

```
	89 / 77
	88/ 67
	234 / 231
	67 / 63
	84 / 81

```
This commit is contained in:
Dirk 2017-11-20 16:33:40 +01:00
parent 209b21c817
commit 77fc111b13

View File

@ -2598,7 +2598,7 @@ std_cipherlists() {
# sockets inspired by http://blog.chris007.de/?p=238
# ARG1: hexbyte with a leading comma (!!), separated by commas
# ARG2: sleep
socksend() {
socksend2() {
local data
# the following works under BSD and Linux, which is quite tricky. So don't mess with it unless you're really sure what you do
@ -2612,12 +2612,12 @@ socksend() {
sleep $2
}
socksend2() {
socksend() {
local data line
# read line per line and strip comments (bash internal func can't handle multiline statements
data="$(while read line; do
printf "${line%\#*}"
printf "${line%%\#*}"
done <<< "$1" )"
data="${data// /}" # strip ' '
data="${data//,/\\}" # s&r , by \