MCPcopy
hub / github.com/davyxu/cellnet / rpc_StartClient

Function rpc_StartClient

tests/rpc_test.go:132–143  ·  view source on GitHub ↗
(eventFunc func(event cellnet.Event))

Source from the content-addressed store, hash-verified

130}
131
132func rpc_StartClient(eventFunc func(event cellnet.Event)) {
133
134 queue := cellnet.NewEventQueue()
135
136 p := peer.NewGenericPeer("tcp.Connector", "client", syncRPC_Address, queue)
137
138 proc.BindProcessorHandler(p, "tcp.ltv.type", eventFunc)
139
140 p.Start()
141
142 queue.StartLoop()
143}
144
145func TestSyncRPC(t *testing.T) {
146

Callers 3

TestSyncRPCFunction · 0.85
TestASyncRPCFunction · 0.85
TestTypeRPCFunction · 0.85

Calls 5

StartLoopMethod · 0.95
NewEventQueueFunction · 0.92
NewGenericPeerFunction · 0.92
BindProcessorHandlerFunction · 0.92
StartMethod · 0.65

Tested by

no test coverage detected