How to register a service with Mono.ZeroConf?

前端 未结 5 1586
别跟我提以往
别跟我提以往 2021-02-04 18:47

I\'m trying to test the ZeroConf sample at http://www.mono-project.com/Mono.Zeroconf.

I\'m running OpenSuse 11 and Mono 2.2.

My server code is:

u         


        
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-04 19:31

    I wasn't able to get a service published either. I looked through the code and there is a bug in Service.cs, the UPort setter:

    this.port = (ushort) IPAddress.HostToNetworkOrder((int) value);  //overflow, port is always 0
    

    It should be

    this.port = (ushort) IPAddress.HostToNetworkOrder((short) value);
    

提交回复
热议问题