Skip to content

Commit

Permalink
fixes nanomsg#23 Remove protocol.ProtocolName()
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Oct 30, 2018
1 parent 9e3b0a4 commit 3cf085c
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,5 @@ const (
ProtoSurveyor = (6 * 16) + 2
ProtoRespondent = (6 * 16) + 3
ProtoBus = (7 * 16)

// Experimental Protocols - Use at Risk

ProtoStar = (100 * 16)
ProtoStar = (100 * 16) // Experimental!
)

// ProtocolName returns the name corresponding to a given protocol number.
// This is useful for transports like WebSocket, which use a text name
// rather than the number in the handshake.
func ProtocolName(number uint16) string {
names := map[uint16]string{
ProtoPair: "pair",
ProtoPub: "pub",
ProtoSub: "sub",
ProtoReq: "req",
ProtoRep: "rep",
ProtoPush: "push",
ProtoPull: "pull",
ProtoSurveyor: "surveyor",
ProtoRespondent: "respondent",
ProtoBus: "bus"}
return names[number]
}

0 comments on commit 3cf085c

Please sign in to comment.