mirror of
https://github.com/soypat/lneto.git
synced 2026-08-05 07:27:54 +00:00
018f9258ac
* begin reviewing TCP listener * begin adding listener tests * adding TestExchange implementation * split out legacy and Step tests * move listener to tcp package * fix up tcp tests taking very long * add xnet.TCPPool and work on TCPPool semantics * xnet: TCPPool only accepts established connections * xnet: getting to bottom of panic in xnet.Listener * xnet: improve listener tests * fix several data races in testing fixtures * fix more synchronization things in listener test * finalize tcplistener test
32 lines
857 B
Go
32 lines
857 B
Go
package lneto
|
|
|
|
// type ErrorPacketDrop struct {
|
|
// Message string
|
|
// }
|
|
|
|
// var genericErrPacketDrop = &ErrorPacketDrop{Message: ErrPacketDrop.Error()}
|
|
|
|
// // ErrGenericPacketDrop returns the generic packet drop error. It performs no allocations.
|
|
// func ErrGenericPacketDrop() error {
|
|
// return genericErrPacketDrop
|
|
// }
|
|
|
|
// func (err *ErrorPacketDrop) Error() string {
|
|
// return err.Message
|
|
// }
|
|
|
|
type errGeneric uint8
|
|
|
|
// Generic errors common to internet functioning.
|
|
const (
|
|
_ errGeneric = iota // non-initialized err
|
|
ErrPacketDrop // packet dropped
|
|
ErrBadCRC // incorrect checksum
|
|
ErrZeroSource // zero source(port/addr)
|
|
ErrZeroDestination // zero destination(port/addr)
|
|
)
|
|
|
|
func (err errGeneric) Error() string {
|
|
return err.String()
|
|
}
|