github.com/searKing/golang/go@v1.2.117/net/listener.error.go (about)

     1  // Copyright 2020 The searKing Author. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package net
     6  
     7  import "net"
     8  
     9  // type check
    10  var _ net.Error = ErrListenerClosed
    11  
    12  type errListenerClosed string
    13  
    14  func (e errListenerClosed) Error() string   { return string(e) }
    15  func (e errListenerClosed) Temporary() bool { return false }
    16  func (e errListenerClosed) Timeout() bool   { return false }
    17  
    18  // ErrListenerClosed is returned from Listener.Accept when the underlying
    19  // listener is closed.
    20  var ErrListenerClosed = errListenerClosed("net: listener closed")