Topic: ENet for C#
Hi,
could you upload version 1.3.3 of ENet for C#. Unfortunately the version is not linked on the project site.
Thank you.
Regards
You are not logged in. Please login or register.
Zer's Programming Page → Discussion → ENet for C#
Hi,
could you upload version 1.3.3 of ENet for C#. Unfortunately the version is not linked on the project site.
Thank you.
Regards
Hi Random,
Hmm... This is an interesting request. Are you on Linux by any chance? I hadn't realized ENet was packaged, but it does indeed appear to be 1.3.3...
The only binary incompatibility you should encounter with the library is that Peer.SetPingInterval and Peer.SetTimeouts require 1.3.4+. If you avoid these two functions, you'll be able to use the 1.3.6 library just fine with 1.3.3. If it doesn't work, that's a bug I ought to fix.
That said, you will need to use Mono's DLL Map feature to map from ENetX86.dll to libenet.so.1.
Alternatively, I could make a version that searches for libenet.so.1 automatically (needing no DLL Map), and throws NotSupportedException if you happen to use either of those two methods. If I were to code up such a version, would you be interested in testing it for me?
James
Here, try this version and let me know if it works reasonably well for you:
Hello James,
thanks for you quick reply. Yeah, I am on Linux Mint 14.
We are using at the moment ENetCS 1.3.1 in ManicDigger (a free C# Minecraft clone).
I am trying to fix an issue where the server displays wrong IPs of the connected clients (manicdigger.sourceforge.net/forum/viewtopic.php?f=9&t=2832).
This problem only appears on Linux machines. On Windows it works fine.
I don't know if it's a problem of Mono, the ENet library or our code.
However I saw in the changelog of version 1.3.3 of ENetCS:
"Replaced the Address struct with native .NET IPEndPoint."
I thought it may fix my problem.
At the moment the code which returns an peer's IP is:
public unsafe IPEndPoint RemoteEndPoint
{
get { return new IPEndPoint(peer.NativeData->address.host, peer.NativeData->address.port); }
}
I also tried ENetCS 1.3.6.2. A few changes in our code where necessary and I had map the ENetX64.dll to libenet.so like you described. However I didn't manage to establish a connection between a client and server yet.
I also updated Mono to version 3.0.6 and manually installed the latest ENet version. Both didn't fix our IP issue.
I am going to try your latest version you've posted.
Do you have any idea what the problem could be?
Thank you very much for your great C# ENet wrapper.
Regards
I've found your address bug, and submitted it at https://bugzilla.xamarin.com/show_bug.cgi?id=11899. It's a bug in Mono's P/Invoke. Luckily, it's easy to work around. Here's a version to try:
http://www.zer7.com/files/oss/enetcs/EN … -04-23.zip
Let me know how this one works for you. My test Kubuntu virtual machine (x86-64) now does Peer.GetRemoteAddress() correctly.
James
Awesome! Your new version (ENet_2013-04-23) works fine. Dll mapping is no longer required. The IPs are also being correctly displayed now.
I hope they manage to fix the bug in Mono soon.
My libenet1a version is: libenet1a:amd64 1.3.3-2ubuntu1.
Would ENetCS work on MacOS in Mono, too? Unfortunately I don't have a Mac and are not much familiar with it. However in the past, some tried to play and port our project to Mac. Maybe I'll find someone to test it.
Anyways, thanks a lot for the new version and the bug workaround.
Regards
It will indeed work on MacOS, and I did recently acquire a MacBook for USB driver development.
So, I've included a MacOS 32/64-bit binary in the now-posted 1.3.6.3 release. Please let me know if you run into any issues with it.
Have a good day
James
Zer's Programming Page → Discussion → ENet for C#
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 2 official extensions. Copyright © 2003–2009 PunBB.