You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

DefaultUdpSocketProvider.cs 495 B

12345678910111213141516171819
  1. using System;
  2. namespace Discord.Net.Udp
  3. {
  4. public static class DefaultUdpSocketProvider
  5. {
  6. public static readonly UdpSocketProvider Instance = () =>
  7. {
  8. try
  9. {
  10. return new DefaultUdpSocket();
  11. }
  12. catch (PlatformNotSupportedException ex)
  13. {
  14. throw new PlatformNotSupportedException("The default UdpSocketProvider is not supported on this platform.", ex);
  15. }
  16. };
  17. }
  18. }