func NewWebsocket(readBufferSize int, writeBufferSize int, enableCompression bool, originCheck func(*http.Request) bool) *Websocket {
	transport := &Websocket{
		readBufferSize:    readBufferSize,
		writeBufferSize:   writeBufferSize,
		enableCompression: enableCompression,
		originCheck:       originCheck,

		running: false,
		codec:   codec.Websocket{},
	}

	transport.lock()

	return transport
}
// NewWebsocket creates new Websocket transport
NewWebsocket creates new Websocket transport
// NewWebsocket creates new Websocket transport
func NewWebsocket(readBufferSize int, writeBufferSize int, enableCompression bool, originCheck func(*http.Request) bool) *Websocket {
	transport := &Websocket{
		readBufferSize:    readBufferSize,
		writeBufferSize:   writeBufferSize,
		enableCompression: enableCompression,
		originCheck:       originCheck,
		running: false,
		codec:   codec.Websocket{},
	}
	transport.lock()
	return transport
}
func NewWebsocket ( readBufferSize int , writeBufferSize int , enableCompression bool , originCheck func ( * http . Request ) bool ) * Websocket { transport := & Websocket { readBufferSize : readBufferSize , writeBufferSize : writeBufferSize , enableCompression : enableCompression , originCheck : originCheck , running : false , codec : codec . Websocket { } , } transport . lock ( ) return transport }
NewWebsocket creates new Websocket transport
NewWebsocket creates new Websocket transport