You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

12 lines
283 B

package znet
import "github.com/aceld/zinx/ziface"
type Option func(s *Server)
// 只要实现Packet 接口可自由实现数据包解析格式,如果没有则使用默认解析格式
func WithPacket(pack ziface.Packet) Option {
return func(s *Server) {
s.packet = pack
}
}