Description

Port returns the TCP port number that the kite listens. Port must be called after the listener is initialized. You can use ServerReadyNotify function to get notified when listener is ready.

Kite starts to listen the port when Run() is called. Since Run() is blocking you need to run it as a goroutine the call this function when listener is ready.

Example:

k := kite.New("x", "1.0.0")
go k.Run()
<-k.ServerReadyNotify()
port := k.Port()

Port is referenced in 3 repositories

github.com/koding/kite github.com/BigRoom/zombies github.com/vladimiroff/checker