MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / serverComplex

Function serverComplex

crypto/etls/conn_test.go:135–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133}
134
135func serverComplex() *CryptoListener {
136 if err := rpc.Register(new(FooComplex)); err != nil {
137 log.Error("failed to register RPC method")
138 }
139
140 listener, err := NewCryptoListener("tcp", serviceComplex, simpleCipherHandler)
141 if err != nil {
142 log.Errorf("server: listen: %s", err)
143 }
144 log.Debug("server: listening")
145 go func() {
146 for {
147 conn, err := listener.Accept()
148 if err != nil {
149 log.Debugf("server: accept: %s", err)
150 break
151 }
152 log.Debugf("server: accepted from %s", conn.RemoteAddr())
153 go handleClient(conn)
154 }
155 }()
156 return listener
157}
158
159func clientComplex(pass string, args *QueryComplex) (ret *ResultComplex, err error) {
160 cipher := NewCipher([]byte(pass))

Callers 1

TestComplexRPCFunction · 0.85

Calls 9

AcceptMethod · 0.95
ErrorFunction · 0.92
ErrorfFunction · 0.92
DebugFunction · 0.92
DebugfFunction · 0.92
NewCryptoListenerFunction · 0.85
handleClientFunction · 0.85
RegisterMethod · 0.80
RemoteAddrMethod · 0.80

Tested by

no test coverage detected