18 lines
242 B
Go
18 lines
242 B
Go
package main
|
|
|
|
import (
|
|
"server/core"
|
|
)
|
|
|
|
func main() {
|
|
server := core.New()
|
|
|
|
server.AddHandler(0, func(data []byte, client *core.Client) {
|
|
// count := data[1]
|
|
// fmt.Println(count)
|
|
server.SendTo(data, client)
|
|
})
|
|
|
|
server.Run(4242)
|
|
}
|