Skip to content

Instantly share code, notes, and snippets.

@zeroFruit
Created October 31, 2020 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeroFruit/7bb04116af84cf181e4e8ffd70be8c75 to your computer and use it in GitHub Desktop.
Save zeroFruit/7bb04116af84cf181e4e8ffd70be8c75 to your computer and use it in GitHub Desktop.
Modeling the Internet from the scratch: Link-layer, LAN, Switch - Code snippet: Port
// Port can transmit data and can be point of link. But it has no hardware
// address. Before using Port, it must register its own Id
type Port interface {
Transmitter
EndPoint
Register(id Id)
Registered() bool
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment