MCPcopy
hub / github.com/nats-io/nats.go / wsAcceptKey

Function wsAcceptKey

ws.go:831–836  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

829}
830
831func wsAcceptKey(key string) string {
832 h := sha1.New()
833 h.Write([]byte(key))
834 h.Write(wsGUID)
835 return base64.StdEncoding.EncodeToString(h.Sum(nil))
836}
837
838// Returns true if the op code corresponds to a control frame.
839func wsIsControlFrame(frameType wsOpCode) bool {

Callers 1

wsInitHandshakeMethod · 0.85

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected