func NewMessage(binary bool, data []byte) Packet {
	if binary {
		return NewBinaryMessage(data)
	}

	return NewStringMessage(string(data))
}
// NewMessage creates new message depending on its type
NewMessage creates new message depending on its type
// NewMessage creates new message depending on its type
func NewMessage(binary bool, data []byte) Packet {
	if binary {
		return NewBinaryMessage(data)
	}
	return NewStringMessage(string(data))
}
func NewMessage ( binary bool , data [ ] byte ) Packet { if binary { return NewBinaryMessage ( data ) } return NewStringMessage ( string ( data ) ) }
NewMessage creates new message depending on its type
NewMessage creates new message depending on its type