File tree Expand file tree Collapse file tree 3 files changed +28
-25
lines changed
Smdn.Net.MuninNode.Transport Expand file tree Collapse file tree 3 files changed +28
-25
lines changed Original file line number Diff line number Diff line change 1+ // SPDX-FileCopyrightText: 2025 smdn <smdn@smdn.jp>
2+ // SPDX-License-Identifier: MIT
3+ using System . Net ;
4+ using System . Threading ;
5+ using System . Threading . Tasks ;
6+
7+ namespace Smdn . Net . MuninNode . Transport ;
8+
9+ internal sealed class MuninNodeListenerFactory : IMuninNodeListenerFactory {
10+ public static readonly MuninNodeListenerFactory Instance = new ( ) ;
11+
12+ public ValueTask < IMuninNodeListener > CreateAsync (
13+ EndPoint endPoint ,
14+ IMuninNode node ,
15+ CancellationToken cancellationToken
16+ )
17+ #pragma warning disable CA2000
18+ => new (
19+ new MuninNodeListener (
20+ endPoint : endPoint ,
21+ logger : null ,
22+ serviceProvider : null
23+ )
24+ ) ;
25+ #pragma warning restore CA2000
26+ }
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ protected override EndPoint GetLocalEndPointToBind()
5858 port : port
5959 ) ;
6060
61- private new sealed class ListenerFactory ( ILogger ? logger ) : IMuninNodeListenerFactory {
61+ private sealed class ListenerFactory ( ILogger ? logger ) : IMuninNodeListenerFactory {
6262 public ValueTask < IMuninNodeListener > CreateAsync (
6363 EndPoint endPoint ,
6464 IMuninNode node ,
Original file line number Diff line number Diff line change 11// SPDX-FileCopyrightText: 2023 smdn <smdn@smdn.jp>
22// SPDX-License-Identifier: MIT
3- using System . Net ;
4- using System . Threading ;
5- using System . Threading . Tasks ;
6-
73using Microsoft . Extensions . Logging ;
84
95using Smdn . Net . MuninNode . Transport ;
@@ -35,29 +31,10 @@ protected LocalNode(
3531 ILogger ? logger
3632 )
3733 : base (
38- listenerFactory : listenerFactory ?? ListenerFactory . Instance ,
34+ listenerFactory : listenerFactory ?? MuninNodeListenerFactory . Instance ,
3935 accessRule : accessRule ,
4036 logger : logger
4137 )
4238 {
4339 }
44-
45- private sealed class ListenerFactory : IMuninNodeListenerFactory {
46- public static readonly ListenerFactory Instance = new ( ) ;
47-
48- public ValueTask < IMuninNodeListener > CreateAsync (
49- EndPoint endPoint ,
50- IMuninNode node ,
51- CancellationToken cancellationToken
52- )
53- #pragma warning disable CA2000
54- => new (
55- new MuninNodeListener (
56- endPoint : endPoint ,
57- logger : null ,
58- serviceProvider : null
59- )
60- ) ;
61- #pragma warning restore CA2000
62- }
6340}
You can’t perform that action at this time.
0 commit comments