MCPcopy Index your code
hub / github.com/google/seesaw / syncRPC

Method syncRPC

engine/core.go:258–274  ·  view source on GitHub ↗

syncRPC starts a server to handle synchronisation RPCs via a TCP socket.

()

Source from the content-addressed store, hash-verified

256
257// syncRPC starts a server to handle synchronisation RPCs via a TCP socket.
258func (e *Engine) syncRPC() {
259 // TODO(jsing): Make this default to IPv6, if configured.
260 addr := &net.TCPAddr{
261 IP: e.config.Node.IPv4Addr,
262 Port: e.config.SyncPort,
263 }
264 ln, err := net.ListenTCP("tcp", addr)
265 if err != nil {
266 log.Fatalf("Listen failed: %v", err)
267 }
268
269 go e.syncServer.serve(ln)
270
271 <-e.shutdownRPC
272 ln.Close()
273 e.shutdownRPC <- true
274}
275
276// initNetwork initialises the network configuration for load balancing.
277func (e *Engine) initNetwork() {

Callers 1

RunMethod · 0.95

Implementers 3

EngineClientha/engine_client.go
DummyEngineha/engine_client.go
SeesawEngineengine/ipc.go

Calls 2

serveMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected