github.com/angenalZZZ/gofunc@v0.0.0-20210507121333-48ff1be3917b/net/errors.go (about) 1 package net 2 3 import "errors" 4 5 var ( 6 // ErrUnsupportedProtocol occurs when trying to use protocol that is not supported. 7 ErrUnsupportedProtocol = errors.New("unsupported protocol on this platform") 8 // ErrUnsupportedPlatform occurs when running gnet on an unsupported platform. 9 ErrUnsupportedPlatform = errors.New("unsupported platform in gnet") 10 11 // errServerShutdown occurs when server is closing. 12 errServerShutdown = errors.New("server is going to be shutdown") 13 // errInvalidFixedLength occurs when the output data have invalid fixed length. 14 errInvalidFixedLength = errors.New("invalid fixed length of bytes") 15 // errUnexpectedEOF occurs when no enough data to read by codec. 16 errUnexpectedEOF = errors.New("there is no enough data") 17 // errDelimiterNotFound occurs when no such a delimiter is in input data. 18 errDelimiterNotFound = errors.New("there is no such a delimiter") 19 // errCRLFNotFound occurs when a CRLF is not found by codec. 20 errCRLFNotFound = errors.New("there is no CRLF") 21 // errUnsupportedLength occurs when unsupported lengthFieldLength is from input data. 22 errUnsupportedLength = errors.New("unsupported lengthFieldLength. (expected: 1, 2, 3, 4, or 8)") 23 // errTooLessLength occurs when adjusted frame length is less than zero. 24 errTooLessLength = errors.New("adjusted frame length is less than zero") 25 )