golang结构定义中的chan词是什么意思
我在读以太坊代码, 下面是什么意思golang结构定义中的chan词是什么意思,go,Go,我在读以太坊代码, 下面是什么意思 结构{…}中的列表是。顶部的协议字段是一个。其余部分使用格式声明。例如closed, type protoRW struct { Protocol in chan Msg // receives read messages closed <-chan struct{} // receives when peer is shutting down wstart <-chan struct{} // rec
结构{…}
中的列表是。顶部的协议
字段是一个。其余部分使用
格式声明。例如closed,
type protoRW struct {
Protocol
in chan Msg // receives read messages
closed <-chan struct{} // receives when peer is shutting down
wstart <-chan struct{} // receives when write may start
werr chan<- error // for write results
offset uint64
w MsgWriter
}