2020-02-19 01:36:18 +01:00
|
|
|
package srpc
|
|
|
|
|
|
|
|
import (
|
2020-07-06 01:17:10 +02:00
|
|
|
"olznet.de/slog"
|
2020-03-26 01:28:15 +01:00
|
|
|
"time"
|
2020-02-19 01:36:18 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
type LogErrorFunc func(format string, args ...interface{})
|
|
|
|
|
2020-07-06 01:17:10 +02:00
|
|
|
var logError = LogErrorFunc(slog.LOG_ERROR)
|
2020-02-19 01:36:18 +01:00
|
|
|
|
|
|
|
func SetLogError(f LogErrorFunc) {
|
|
|
|
logError = f
|
|
|
|
}
|
2020-03-25 09:45:23 +01:00
|
|
|
|
|
|
|
type messageState uint8
|
|
|
|
|
|
|
|
const (
|
|
|
|
FREE messageState = 0
|
|
|
|
PENDING messageState = 1
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2020-03-26 02:12:46 +01:00
|
|
|
DefaultMaxClientRequests = int(128)
|
|
|
|
DefaultRequestTimeout = 30 * time.Second
|
2020-07-06 01:17:10 +02:00
|
|
|
DefaultSimultanousClientRequests = int(15)
|
2020-03-25 09:45:23 +01:00
|
|
|
)
|