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.


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

Port is referenced in 3 repositories