func NewSession(config config.Config, events chan<- interface{}) *Session {
	supportedTransports := make(map[string]bool)

	for _, transport := range config.Transports {
		supportedTransports[transport] = true
	}

	return &Session{
		id:                  utils.GenerateBase64ID(),
		config:              config,
		supportedTransports: supportedTransports,

		events: events,

		handshaked: false,
		closed:     false,
	}
}
// NewSession creates a new client session
NewSession creates a new client session
// NewSession creates a new client session
func NewSession(config config.Config, events chan<- interface{}) *Session {
	supportedTransports := make(map[string]bool)
	for _, transport := range config.Transports {
		supportedTransports[transport] = true
	}
	return &Session{
		id:                  utils.GenerateBase64ID(),
		config:              config,
		supportedTransports: supportedTransports,
		events: events,
		handshaked: false,
		closed:     false,
	}
}
func NewSession ( config config . Config , events chan <- interface { } ) * Session { supportedTransports := make ( map [ string ] bool ) for _ , transport := range config . Transports { supportedTransports [ transport ] = true } return & Session { id : utils . GenerateBase64ID ( ) , config : config , supportedTransports : supportedTransports , events : events , handshaked : false , closed : false , } }
NewSession creates a new client session
NewSession creates a new client session