Port Label

How to add label to port object when port is connected or linked to another port?

Thank You

To do something when a link is connected to a port, it depends on whether you only want to notice when a user interactively draws or reconnects a link, or whether you want to be called always if the link is created or modified programmatically.
For the former case, you can implement GoView.LinkCreated and GoView.LinkRelinked event handlers.
For the latter case, you can implement a GoDocument.Changed event handler to look for the GoLayer.ObjectChanged Hint and the GoPort.ChangedAddedLink or GoPort.ChangedRemovedLink SubHints.
Or you can override GoPort.OnLinkChanged, as the LimitedNodePort example class does in Demo1. LimitedNodePort just changes the color of the port, but you could set GoGeneralNodePort.Label, either to null/Nothing or to a GoGeneralNodePortLabel.