cosmetic: consistent method order

This commit is contained in:
Matthias Radestock committed 2015-01-21 20:55:51 +00:00
1 parent fe07a41dc3
commit 9a27299562
1 file changed
+10 -10
+10 -10
View File
@@ -84,13 +84,13 @@ func (conn *RemoteConnection) RemoteTCPAddr() string {
return conn.remoteTCPAddr
}
func (conn *RemoteConnection) Shutdown(error) {
}
func (conn *RemoteConnection) Established() bool {
return true
}
func (conn *RemoteConnection) Shutdown(error) {
}
func (conn *RemoteConnection) String() string {
from := "<nil>"
if conn.local != nil {
@@ -125,7 +125,7 @@ func (conn *LocalConnection) Start(acceptNewPeer bool) {
}
func (conn *LocalConnection) BreakTie(dupConn *LocalConnection) ConnectionTieBreak {
// conn.uid is used as the tie breaker here, in the knowledge that
// conn.uid is used as the tie breaker here, in the knowledge that
// both sides will make the same decision.
if conn.uid < dupConn.uid {
return TieBreakWon
@@ -136,12 +136,6 @@ func (conn *LocalConnection) BreakTie(dupConn *LocalConnection) ConnectionTieBre
}
}
func (conn *LocalConnection) Established() bool {
conn.RLock()
defer conn.RUnlock()
return conn.established
}
// Read by the forwarder processes when in the UDP senders
func (conn *LocalConnection) RemoteUDPAddr() *net.UDPAddr {
conn.RLock()
@@ -149,6 +143,12 @@ func (conn *LocalConnection) RemoteUDPAddr() *net.UDPAddr {
return conn.remoteUDPAddr
}
func (conn *LocalConnection) Established() bool {
conn.RLock()
defer conn.RUnlock()
return conn.established
}
// Called by the forwarder processes in a few places (including
// crypto), but the connection TCP receiver process, and by the local
// peer actor process. Do not call this from the connection's actor