a:errorcode: add values from RFC 6062

This commit is contained in:
Aleksandr Razumov
2018-08-21 02:55:54 +03:00
parent 45a844ed04
commit 2221c952a5

View File

@@ -109,6 +109,14 @@ const (
CodeInsufficientCapacity ErrorCode = 508 // Insufficient Capacity
)
// Error codes from RFC 6062.
//
// RFC 6062 Section 6.3
const (
CodeConnAlreadyExists ErrorCode = 446
CodeConnTimeoutOrFailure ErrorCode = 447
)
// Error codes from RFC 6156.
//
// RFC 6156 Section 10.2
@@ -134,6 +142,10 @@ var errorReasons = map[ErrorCode][]byte{
CodeAllocQuotaReached: []byte("Allocation Quota Reached"),
CodeInsufficientCapacity: []byte("Insufficient Capacity"),
// RFC 6062.
CodeConnAlreadyExists: []byte("Connection Already Exists"),
CodeConnTimeoutOrFailure: []byte("Connection Timeout or Failure"),
// RFC 6156.
CodeAddrFamilyNotSupported: []byte("Address Family not Supported"),
CodePeerAddrFamilyMismatch: []byte("Peer Address Family Mismatch"),