Although it’s not related to your code ( gnet issue ), But i can’t compile the gateway under windows , plz any suggestion(s) on that ?
here’s the compile error :
# github.com/panjf2000/gnet ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:140:2: cannot use interface {} value as type []byte in return argument: need type assertion ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:140:23: cannot use c (type *stdConn) as type Conn in argument to c.codec.Decode: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:146:36: cannot use c (type *stdConn) as type Conn in argument to c.codec.Encode: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:149:31: cannot use c (type *stdConn) as type Conn in argument to c.loop.eventHandler.PreWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:151:33: cannot use c (type *stdConn) as type Conn in argument to c.loop.eventHandler.AfterWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:254:30: cannot use c (type *stdConn) as type Conn in argument to c.loop.eventHandler.PreWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:256:32: cannot use c (type *stdConn) as type Conn in argument to c.loop.eventHandler.AfterWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\eventloop_windows.go:102:41: cannot use c (type *stdConn) as type Conn in argument to el.eventHandler.OnOpened: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\eventloop_windows.go:104:27: cannot use c (type *stdConn) as type Conn in argument to el.eventHandler.PreWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\eventloop_windows.go:106:29: cannot use c (type *stdConn) as type Conn in argument to el.eventHandler.AfterWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\eventloop_windows.go:106:29: too many errors
Although it’s not related to your code ( gnet issue ), But i can’t compile the gateway under windows , plz any suggestion(s) on that ? here’s the compile error :
# github.com/panjf2000/gnet ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:140:2: cannot use interface {} value as type []byte in return argument: need type assertion ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:140:23: cannot use c (type *stdConn) as type Conn in argument to c.codec.Decode: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:146:36: cannot use c (type *stdConn) as type Conn in argument to c.codec.Encode: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:149:31: cannot use c (type *stdConn) as type Conn in argument to c.loop.eventHandler.PreWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:151:33: cannot use c (type *stdConn) as type Conn in argument to c.loop.eventHandler.AfterWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:254:30: cannot use c (type *stdConn) as type Conn in argument to c.loop.eventHandler.PreWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\connection_windows.go:256:32: cannot use c (type *stdConn) as type Conn in argument to c.loop.eventHandler.AfterWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\eventloop_windows.go:102:41: cannot use c (type *stdConn) as type Conn in argument to el.eventHandler.OnOpened: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\eventloop_windows.go:104:27: cannot use c (type *stdConn) as type Conn in argument to el.eventHandler.PreWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\eventloop_windows.go:106:29: cannot use c (type *stdConn) as type Conn in argument to el.eventHandler.AfterWrite: *stdConn does not implement Conn (missing ConnID method) ..\..\..\..\..\..\..\..\pkg\mod\github.com\teamgram\gnet@v1.6.5-0.20220203114726-06bfacbd8548\eventloop_windows.go:106:29: too many errors