Created
October 31, 2020 12:25
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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