-#if MONOTOUCH
- // when the linker is enabled then reflection won't work and would throw an NRE
- // this is also always true for iOS - so we do not need to poke internals
- static bool SupportsPortReuse ()
- {
- return true;
- }
-#else
- static bool? supportsPortReuse;
- static bool SupportsPortReuse ()
- {
- if (supportsPortReuse.HasValue)
- return supportsPortReuse.Value;
-
- supportsPortReuse = (bool) typeof (Socket).GetMethod ("SupportsPortReuse",
- BindingFlags.Static | BindingFlags.NonPublic)
- .Invoke (null, new object [] {});
- return supportsPortReuse.Value;
- }
-#endif
-