github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/tcp/errors.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package tcp 4 5 import ( 6 er "../error" 7 "../protocol" 8 ) 9 10 const domainEnglish = "TCP" 11 const domainPersian = "TCP" 12 13 // Errors 14 var ( 15 ErrPacketTooShort er.Error 16 ErrPacketWrongLength er.Error 17 ) 18 19 func init() { 20 ErrPacketTooShort.Init("domain/tcp.protocol.error; name=packet-too-short") 21 ErrPacketTooShort.SetDetail(protocol.LanguageEnglish, domainEnglish, 22 "Packet Too Short", 23 "TCP packet is empty or too short than standard header. It must include at least 20Byte header", 24 "", 25 "", 26 nil) 27 28 ErrPacketWrongLength.Init("domain/tcp.protocol.error; name=packet-wrong-length") 29 ErrPacketTooShort.SetDetail(protocol.LanguageEnglish, domainEnglish, 30 "Packet Wrong Length", 31 "Data offset set in TCP packet header is not set correctly", 32 "", 33 "", 34 nil) 35 }