This commit is contained in:
2026-08-04 06:17:32 +03:00
parent 53f9819d40
commit 2028db671f
19 changed files with 159 additions and 45 deletions
+9 -3
View File
@@ -3143,10 +3143,16 @@ public partial class EpConnection : NetworkConnection, IStore
return new AsyncReply<bool>(true);
var host = Instance.Name.Split(':');
if (!Uri.TryCreate($"ep://{Instance.Name}", UriKind.Absolute, out var endpoint)
|| string.IsNullOrWhiteSpace(endpoint.Host)
|| endpoint.Port <= 0
|| endpoint.Port > ushort.MaxValue)
throw new FormatException(
"EP endpoints must include an explicit port (for example, ep://host:port)."
);
var address = host[0];
var port = host.Length > 1 ? ushort.Parse(host[1]) : (ushort)10518;
var address = endpoint.Host;
var port = checked((ushort)endpoint.Port);
// assign domain from hostname if not provided
if (context is EpConnectionContext epContext)
+4 -2
View File
@@ -131,12 +131,14 @@ public class EpServer : NetworkServer<EpConnection>, IResource
set;
}
//[Attribute]
/// <summary>
/// Application-supplied native TCP port. Zero requests an ephemeral port from the OS.
/// </summary>
public ushort Port
{
get;
set;
} = 10518;
}
/// <summary>
/// Controls whether warehouse initialization opens Esiur's native TCP listener.