diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-16 19:55:07 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-16 19:55:07 +0900 |
commit | 5dddfe65e94deb55c1dcb4dfab1ea48390771168 (patch) | |
tree | ccf21762b6908524df21f809fcd1a47c10952ac7 | |
parent | 95e585d7f09413fe5fc89397f8b4d50ac41556b8 (diff) |
server: merge io package
Likely no other users.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | server/server.go | 5 | ||||
-rw-r--r-- | server/sockopt.go (renamed from io/sockopt.go) | 2 | ||||
-rw-r--r-- | server/sockopt_test.go (renamed from io/sockopt_test.go) | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/server/server.go b/server/server.go index a082af4d..56fe5960 100644 --- a/server/server.go +++ b/server/server.go @@ -18,7 +18,6 @@ package server import ( "fmt" "github.com/osrg/gobgp/config" - "github.com/osrg/gobgp/io" "net" "os" "strconv" @@ -84,13 +83,13 @@ func (server *BgpServer) Serve() { case peer := <-server.addedPeerCh: fmt.Println(peer) addr := peer.NeighborAddress.String() - io.SetTcpMD5SigSockopts(int(f.Fd()), addr, peer.AuthPassword) + SetTcpMD5SigSockopts(int(f.Fd()), addr, peer.AuthPassword) p := NewPeer(server.bgpConfig.Global, peer) peerMap[peer.NeighborAddress.String()] = p case peer := <-server.deletedPeerCh: fmt.Println(peer) addr := peer.NeighborAddress.String() - io.SetTcpMD5SigSockopts(int(f.Fd()), addr, "") + SetTcpMD5SigSockopts(int(f.Fd()), addr, "") p, found := peerMap[addr] if found { fmt.Println("found neighbor", addr) diff --git a/io/sockopt.go b/server/sockopt.go index 3393a375..10b3c186 100644 --- a/io/sockopt.go +++ b/server/sockopt.go @@ -1,4 +1,4 @@ -package io +package server import ( "net" diff --git a/io/sockopt_test.go b/server/sockopt_test.go index 6c81ec12..7167b4e8 100644 --- a/io/sockopt_test.go +++ b/server/sockopt_test.go @@ -1,4 +1,4 @@ -package io +package server import ( "bytes" |