good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit a6b94648 authored by Anmol Sethi's avatar Anmol Sethi
Browse files

conn: Add noCopy

Closes #349
parent b4b86b90
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,8 @@ const (
// This applies to context expirations as well unfortunately.
// See https://github.com/nhooyr/websocket/issues/242#issuecomment-633182220
type Conn struct {
noCopy
subprotocol string
rwc io.ReadWriteCloser
client bool
......@@ -288,3 +290,6 @@ func (m *mu) unlock() {
default:
}
}
type noCopy struct{}
func (*noCopy) Lock() {}
......@@ -40,6 +40,7 @@ const (
// Conn provides a wrapper around the browser WebSocket API.
type Conn struct {
noCopy
ws wsjs.WebSocket
// read limit for a message in bytes.
......@@ -563,3 +564,6 @@ func (m *mu) unlock() {
default:
}
}
type noCopy struct{}
func (*noCopy) Lock() {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment