github.com/anycable/anycable-go@v1.5.1/ws/config.go (about)

     1  package ws
     2  
     3  // Config contains WebSocket connection configuration.
     4  type Config struct {
     5  	ReadBufferSize    int
     6  	WriteBufferSize   int
     7  	MaxMessageSize    int64
     8  	EnableCompression bool
     9  	AllowedOrigins    string
    10  }
    11  
    12  // NewConfig build a new Config struct
    13  func NewConfig() Config {
    14  	return Config{ReadBufferSize: 1024, WriteBufferSize: 1024, MaxMessageSize: 65536}
    15  }