Preparing for gob RPC testing

This commit is contained in:
Trial97
2019-11-17 17:10:37 +02:00
committed by Dan Christian Bogos
parent 41728e690a
commit 1ee6a98fac

View File

@@ -22,6 +22,7 @@ import (
"bytes"
"crypto/tls"
"crypto/x509"
"encoding/gob"
"fmt"
"io"
"io/ioutil"
@@ -41,6 +42,12 @@ import (
"golang.org/x/net/websocket"
)
func init() {
gob.Register(map[string]interface{}{})
gob.Register([]interface{}{})
gob.Register(time.Duration(0))
gob.Register(time.Time{})
}
func NewServer() (s *Server) {
s = new(Server)
s.httpMux = http.NewServeMux()