MCPcopy Create free account
hub / github.com/dim-an/cod / dial

Function dial

server/client.go:31–40  ·  view source on GitHub ↗
(network, address string)

Source from the content-addressed store, hash-verified

29}
30
31func dial(network, address string) (conn net.Conn, err error) {
32 for i := 0; i != 20; i += 1 {
33 conn, err = net.Dial(network, address)
34 if err == nil {
35 return
36 }
37 time.Sleep(time.Millisecond * 100)
38 }
39 return
40}
41
42func NewClient(configuration Configuration) (client *Client, err error) {
43 conn, err := dial("unix", configuration.GetSocketFile())

Callers 1

NewClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected