이벤트 루프 기반의 네트워킹 gnet 라이브러리 main.go package main import ( "github.com/panjf2000/gnet" ) // EventServer 구조체 type echoServer struct { *gnet.EventServer } // 서버 데이터를 보낼 때 수행하는 함수를 구현 // 해당 함수는 서버가 클라이언트로부터 입력 데이터를 수신하면 호출 func (es *echoServer) React(c gnet.Conn) (out []byte, action gnet.Action) { top, tail := c.ReadPair() out = top if tail != nil { out = append(top, tail...) } // ring 버퍼를 초기화 c.ResetBuffer() return } func main() { echo := new(echoServer) // echoServer 구조체를 객체로 할당 err := gnet.Serve(e...