MCPcopy
hub / github.com/github/gh-ost / BindTCPPort

Method BindTCPPort

go/logic/server.go:132–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130}
131
132func (srv *Server) BindTCPPort() (err error) {
133 if srv.migrationContext.ServeTCPPort == 0 {
134 return nil
135 }
136 srv.tcpListener, err = net.Listen("tcp", fmt.Sprintf(":%d", srv.migrationContext.ServeTCPPort))
137 if err != nil {
138 return err
139 }
140 srv.migrationContext.Log.Infof("Listening on tcp port: %d", srv.migrationContext.ServeTCPPort)
141 return nil
142}
143
144// Serve begins listening & serving on whichever device was configured
145func (srv *Server) Serve() (err error) {

Callers 1

initiateServerMethod · 0.80

Calls 1

InfofMethod · 0.65

Tested by

no test coverage detected