evio icon indicating copy to clipboard operation
evio copied to clipboard

[question] why use count field in loop not len(fdconns)?

Open Ccheers opened this issue 2 years ago • 0 comments


type loop struct {
	idx     int            // loop index in the server loops list
	poll    *internal.Poll // epoll or kqueue
	packet  []byte         // read packet buffer
	fdconns map[int]*conn  // loop connections fd -> conn
	count   int32          // connection count
}

why not use len(fdconns) instead of count?

Ccheers avatar Jun 11 '22 08:06 Ccheers