Created
October 31, 2020 12:30
-
-
Save zeroFruit/10878b3a9f6d9ef8371190448b68e645 to your computer and use it in GitHub Desktop.
Modeling the Internet from the scratch: Link-layer, LAN, Switch - Code snippet: Build network-1
This file contains hidden or 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
func Build() (host1 *link.Host, host2 *link.Host, host3 *link.Host, | |
swch1 *link.Switch, swch2 *link.Switch) { | |
// setup node | |
host1 = link.NewHost() | |
host2 = link.NewHost() | |
host3 = link.NewHost() | |
swch1 = link.NewSwitch() | |
swch2 = link.NewSwitch() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment