mirror of https://github.com/tidwall/redcon.git
updated examples
This commit is contained in:
parent
9d5301c35f
commit
51b9ffb439
|
@ -96,11 +96,13 @@ func main() {
|
|||
}
|
||||
},
|
||||
func(conn redcon.Conn) bool {
|
||||
log.Printf("accept: %s", conn.RemoteAddr())
|
||||
// use this function to accept or deny the connection.
|
||||
// log.Printf("accept: %s", conn.RemoteAddr())
|
||||
return true
|
||||
},
|
||||
func(conn redcon.Conn, err error) {
|
||||
log.Printf("closed: %s, err: %v", conn.RemoteAddr(), err)
|
||||
// this is called when the connection has been closed
|
||||
// log.Printf("closed: %s, err: %v", conn.RemoteAddr(), err)
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
|
|
@ -65,11 +65,13 @@ func main() {
|
|||
}
|
||||
},
|
||||
func(conn redcon.Conn) bool {
|
||||
log.Printf("accept: %s", conn.RemoteAddr())
|
||||
// use this function to accept or deny the connection.
|
||||
// log.Printf("accept: %s", conn.RemoteAddr())
|
||||
return true
|
||||
},
|
||||
func(conn redcon.Conn, err error) {
|
||||
log.Printf("closed: %s, err: %v", conn.RemoteAddr(), err)
|
||||
// this is called when the connection has been closed
|
||||
// log.Printf("closed: %s, err: %v", conn.RemoteAddr(), err)
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue