RevenantX / LiteNetLib

Lite reliable UDP library for Mono and .NET
https://revenantx.github.io/LiteNetLib/index.html
MIT License
3.07k stars 496 forks source link

Unity3d example cannot execute #12

Closed chwuchang closed 7 years ago

chwuchang commented 7 years ago

SocketException: 使用了与请求的协议不兼容的地址。

System.Net.Sockets.Socket..ctor (AddressFamily family, SocketType type, ProtocolType proto) LiteNetLib.NetSocket.Bind (Int32 port) (at C:/Files/LiteNetLib/LiteNetLib/NetSocket.cs:112) LiteNetLib.NetBase.Start (Int32 port) (at C:/Files/LiteNetLib/LiteNetLib/NetBase.cs:188) LiteNetLib.NetBase.Start () (at C:/Files/LiteNetLib/LiteNetLib/NetBase.cs:173) GameClient.Start () (at Assets/GameClient.cs:19)

RevenantX commented 7 years ago

@chwuchang You are using latest version? 0.6.1 or master?

chwuchang commented 7 years ago

Yes 0.6.1, sorry I cant speek english,In NetSocket.cs 113line ,IPv6Support =true ,but " _udpSocketv6 = new Socket(AddressFamily.InterNetworkV6, SocketType.Dgram, ProtocolType.Udp);" is error

RevenantX commented 7 years ago

@chwuchang what unity3d version you are using? And try put newer version into Assets folder in unity. There was outdated version.

chwuchang commented 7 years ago

Oh Thx ,It's ok, the lib is verygood ,I will add my project ,Thx very much