Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mono #7

Closed
somdoron opened this issue Nov 7, 2012 · 2 comments
Closed

Support mono #7

somdoron opened this issue Nov 7, 2012 · 2 comments

Comments

@somdoron
Copy link
Member

somdoron commented Nov 7, 2012

if you have experience with mono and want to make the project support mono you are more than welcome.

@tobi-tobsen
Copy link
Contributor

I just ran the Mono Migration Analyzer (MoMA) and it reported only 4 issues:

  • Calling Method: void TuneTcpKeepalives (Socket, int, int, int, int)
    • Method that Throws NotImplementedException: int Socket.IOControl (IOControlCode, Byte[], Byte[])
  • Calling Method: void TuneTcpKeepalives (Socket, int, int, int, int)
    • Method with [MonoTodo] Reason: int Socket.IOControl (IOControlCode, Byte[], Byte[])
  • Calling Method: void Open ()
    • P/Invoke Method P/Invoke Library: IntPtr Opcode/NativeMethods.VirtualAlloc (IntPtr, UIntPtr, Opcode/AllocationType, Opcode/MemoryProtection) kernel32.dll
  • Calling Method: void Close ()
    • P/Invoke Method P/Invoke Library: bool Opcode/NativeMethods.VirtualFree (IntPtr, UIntPtr, Opcode/FreeType) kernel32.dll

@somdoron
Copy link
Member Author

Actually the TCP Keep Alive is not much of an issue, because this feature is not supported by Mono, therefore if somebody develop for Mono they should not use this feature.

Regarding the VirtualAlloc and VirtualFree, the issue is that zeromq is using something called RDTSC (some kind of timestamp) to decide if need to handle commands or no, the idea is that you only want to handle command once every X microseconds, calling the RDTSC is very cheap in performance while using other methods can cost more.

In order to call RDTSC you need to use assembly, this is way the VirtualAlloc and VirtualFree are used. Also if the platform is not windows RDTSC is not used and instead Stopwatch.GetTimestamp is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants