Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
138 views
in Technique[技术] by (71.8m points)

Ionic zeroconf register yields empty txtRecord

Having a weird issue where I'm trying to share data between local devices using Zeroconf and it works fine up until the amount of data I'm trying to share hits a certain limit. I can't see where there's a config limit or anything so stuck scratching my head.

Here's the call

this.zeroconf.register('_http._tcp.', 'ah.', this.id, 80, {
        'name': this.name,
        'connections': JSON.stringify(this.connections),
        'data': JSON.stringify(this.taskserv.hash())
    }).then(result => {
        console.log('Service registered', result.service);
    });

Which normally gives a good service registration with all my desired data expected service registration

However, when the number of records in my 'data' value hits a certain point, in this case 4, the whole txtRecord winds up empty in the registration

enter image description here

The data I'm trying to send appears to be valid

console.log(JSON.stringify(this.taskserv.hash())) # {"529EC0616114430EB975C43AF401C5D5":{"1":{"id":1,"active":false}},"5CBFBC25E0CF4F73870C30EA014E109A":{"1":{"id":1,"active":false}},"F7C04170A6CB44E0B9339C2109AF1D7D":{"1":{"id":1,"active":true}},"DBCFF221A56145E3A8525DA86C77521C":{"1":{"id":1,"active":false}}}

Any help is appreciated, this is a pretty random and obscure issue and my searches have come up dry.

question from:https://stackoverflow.com/questions/65891750/ionic-zeroconf-register-yields-empty-txtrecord

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...