Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetMulticastOption()

static SocketError System.Net.Sockets.SocketPal.GetMulticastOption ( SafeSocketHandle handle,
SocketOptionName optionName,
out MulticastOption optionValue )
inlinestatic

Definition at line 627 of file SocketPal.cs.

628 {
629 global::Interop.Winsock.IPMulticastRequest optionValue2 = default(global::Interop.Winsock.IPMulticastRequest);
630 int optionLength = global::Interop.Winsock.IPMulticastRequest.Size;
631 SocketError socketError = global::Interop.Winsock.getsockopt(handle, SocketOptionLevel.IP, optionName, out optionValue2, ref optionLength);
632 if (socketError == SocketError.SocketError)
633 {
634 optionValue = null;
635 return GetLastSocketError();
636 }
637 IPAddress group = new IPAddress(optionValue2.MulticastAddress);
638 IPAddress mcint = new IPAddress(optionValue2.InterfaceAddress);
639 optionValue = new MulticastOption(group, mcint);
640 return SocketError.Success;
641 }
static SocketError GetLastSocketError()
Definition SocketPal.cs:22

References System.Net.Sockets.SocketPal.GetLastSocketError(), and System.handle.

Referenced by System.Net.Sockets.Socket.GetMulticastOpt().