func NewServer() *Server {
	server := &Server{
		clients: make(map[string]*Session),
		events:  make(chan interface{}),

		Config: config.Config{
			PingInterval:              25 * time.Second,
			PingTimeout:               60 * time.Second,
			Transports:                []string{transport.PollingType, transport.WebsocketType},
			AllowUpgrades:             true,
			UpgradeTimeout:            10 * time.Second,
			PollingBufferFlushLimit:   10,
			PollingBufferReceiveLimit: 10,
			WebsocketReadBufferSize:   1024,
			WebsocketWriteBufferSize:  1024,
			PerMessageDeflate:         true,
			CheckOrigin:               func(*http.Request) bool { return true },
		},
	}

	go server.checkPing()

	return server
}
// NewServer creates a new engine server
NewServer creates a new engine server
// NewServer creates a new engine server
func NewServer() *Server {
	server := &Server{
		clients: make(map[string]*Session),
		events:  make(chan interface{}),
		Config: config.Config{
			PingInterval:              25 * time.Second,
			PingTimeout:               60 * time.Second,
			Transports:                []string{transport.PollingType, transport.WebsocketType},
			AllowUpgrades:             true,
			UpgradeTimeout:            10 * time.Second,
			PollingBufferFlushLimit:   10,
			PollingBufferReceiveLimit: 10,
			WebsocketReadBufferSize:   1024,
			WebsocketWriteBufferSize:  1024,
			PerMessageDeflate:         true,
			CheckOrigin:               func(*http.Request) bool { return true },
		},
	}
	go server.checkPing()
	return server
}
func NewServer ( ) * Server { server := & Server { clients : make ( map [ string ] * Session ) , events : make ( chan interface { } ) , Config : config . Config { PingInterval : 25 * time . Second , PingTimeout : 60 * time . Second , Transports : [ ] string { transport . PollingType , transport . WebsocketType } , AllowUpgrades : true , UpgradeTimeout : 10 * time . Second , PollingBufferFlushLimit : 10 , PollingBufferReceiveLimit : 10 , WebsocketReadBufferSize : 1024 , WebsocketWriteBufferSize : 1024 , PerMessageDeflate : true , CheckOrigin : func ( * http . Request ) bool { return true } , } , } go server . checkPing ( ) return server }
NewServer creates a new engine server
NewServer creates a new engine server