forked from External/ergo
switch CEF listener for docker support
This commit is contained in:
parent
60172a0be4
commit
979188cf2a
1 changed files with 3 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const PORT = "127.0.0.1:22843"
|
const LISTEN = "0.0.0.0:22843"
|
||||||
|
|
||||||
type CefConnection struct {
|
type CefConnection struct {
|
||||||
connections map[string]net.Conn
|
connections map[string]net.Conn
|
||||||
|
|
@ -33,12 +33,12 @@ func (instance *CefConnection) KickBroadcast(channel string, user string) {
|
||||||
|
|
||||||
func cefConnection(server *Server) *CefConnection {
|
func cefConnection(server *Server) *CefConnection {
|
||||||
// create a tcp listener on the given port
|
// create a tcp listener on the given port
|
||||||
listener, err := net.Listen("tcp", PORT)
|
listener, err := net.Listen("tcp", LISTEN)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Unable to open CefConnection listener:", err)
|
fmt.Println("Unable to open CefConnection listener:", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
fmt.Printf("CefConnection listener on %s active\n", PORT)
|
fmt.Printf("CefConnection listener on %s active\n", LISTEN)
|
||||||
instance := CefConnection{connections: make(map[string]net.Conn), server: server}
|
instance := CefConnection{connections: make(map[string]net.Conn), server: server}
|
||||||
go cefListener(listener, &instance)
|
go cefListener(listener, &instance)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue