(key string)
| 829 | } |
| 830 | |
| 831 | func 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. |
| 839 | func wsIsControlFrame(frameType wsOpCode) bool { |