func newPeer(ctx context.Context, c *websocket.Conn, uid proto.UID, bs *biz.Server, auth func(proto.Authenticatable) error) *Peer {
	p := &Peer{
		auth: auth,
		ctx:  ctx,
	}
	p.conn = jsonrpc2.NewConn(ctx, websocketjsonrpc2.NewObjectStream(c), p)
	p.Peer = biz.NewPeer(uid, bs, p.send)
	return p
}
// newPeer create a peer instance
newPeer create a peer instance
// newPeer create a peer instance
func newPeer(ctx context.Context, c *websocket.Conn, uid proto.UID, bs *biz.Server, auth func(proto.Authenticatable) error) *Peer {
	p := &Peer{
		auth: auth,
		ctx:  ctx,
	}
	p.conn = jsonrpc2.NewConn(ctx, websocketjsonrpc2.NewObjectStream(c), p)
	p.Peer = biz.NewPeer(uid, bs, p.send)
	return p
}
func newPeer ( ctx context . Context , c * websocket . Conn , uid proto . UID , bs * biz . Server , auth func ( proto . Authenticatable ) error ) * Peer { p := & Peer { auth : auth , ctx : ctx , } p . conn = jsonrpc2 . NewConn ( ctx , websocketjsonrpc2 . NewObjectStream ( c ) , p ) p . Peer = biz . NewPeer ( uid , bs , p . send ) return p }
newPeer create a peer instance
newPeer create a peer instance