public static EndPoint EnsureSource(this IPortBound c, localEndPoint.SourceStyle style = localEndPoint.SourceStyle.Private) { if (c.source == null) { c.setLocalSource(0, style); } return(c.source); }
public static void setLocalSource(this IPortBound c, int port, localEndPoint.SourceStyle style = localEndPoint.SourceStyle.Private) { c.source = localEndPoint.LocalEndPoint(port, style); }