Communication.Network.TCP.Shared
2.3.0
See the version list below for details.
dotnet add package Communication.Network.TCP.Shared --version 2.3.0
NuGet\Install-Package Communication.Network.TCP.Shared -Version 2.3.0
<PackageReference Include="Communication.Network.TCP.Shared" Version="2.3.0" />
<PackageVersion Include="Communication.Network.TCP.Shared" Version="2.3.0" />
<PackageReference Include="Communication.Network.TCP.Shared" />
paket add Communication.Network.TCP.Shared --version 2.3.0
#r "nuget: Communication.Network.TCP.Shared, 2.3.0"
#:package Communication.Network.TCP.Shared@2.3.0
#addin nuget:?package=Communication.Network.TCP.Shared&version=2.3.0
#tool nuget:?package=Communication.Network.TCP.Shared&version=2.3.0
DS_Communication
연결형 통신 전송 계층 라이브러리. Session·Channel·Framing·Pipeline을 제공하고,
직렬화 포맷은 IMessageConverter로 앱이 주입합니다. .NET Standard 2.1 (Unity 호환).
패키지
| 패키지 | 내용 | 의존 |
|---|---|---|
Communication.Shared |
Session, Pipeline, Channel 계약, Framing, SendOptions, DisconnectReason |
(없음) |
Communication.Network.TCP.Shared |
TcpSession, StreamByteChannel, TcpTransportOptions |
Shared |
Communication.Network.TCP.Server |
TcpListener 수락 루프 |
TCP.Shared |
Communication.Network.TCP.Client |
TcpConnector 연결 |
TCP.Shared |
Communication.Network.RUDP.Shared |
RudpSession, RudpMessageChannel, RudpSendOptions/RudpDeliveryMethod, RudpTransportOptions |
Shared |
Communication.Network.RUDP.Server |
RudpListener 수락 루프 |
RUDP.Shared |
Communication.Network.RUDP.Client |
RudpConnector 연결 |
RUDP.Shared |
dotnet add package Communication.Shared
dotnet add package Communication.Network.TCP.Server # 서버만 필요하면
dotnet add package Communication.Network.TCP.Client # 클라이언트만 필요하면
dotnet add package Communication.Network.RUDP.Server # RUDP 서버만 필요하면
dotnet add package Communication.Network.RUDP.Client # RUDP 클라이언트만 필요하면
주요 동작
- 길이 프레이밍: 4바이트 little-endian 길이 + payload. 기본 프레임 상한 4MB(절대 상한 64MB).
- 송신: 큐 + 백프레셔(상한 도달 시 비동기 대기) + coalesce 배치 쓰기(기본 64KB). 직렬화 실패 항목은 격리(해당 플러시만 예외)하고 송신은 계속.
- 수신: 프레임 완료 마감(기본 30초, 첫 바이트 도착 시 시작) 초과 시
DisconnectReason.Timeout단절. - 끊김은
Session.Disconnected(DisconnectReason)1회 통지. 재접속·하트비트는 앱 책임.
빠른 시작
// 서버 — 수락된 채널 위에 세션은 앱이 만든다.
using var listener = new TcpListener(IPAddress.Any, 32000);
listener.Accepted += channel =>
{
var session = new TcpSession(channel, new MyConverter(), s => new MyHandler(s));
session.Disconnected += (_, e) => Console.WriteLine($"끊김: {e.Reason}");
};
listener.Start(new TcpTransportOptions { MaxConnections = 1000 });
// 클라이언트
var connector = new TcpConnector();
if (await connector.ConnectAsync("127.0.0.1", 32000))
{
var session = new TcpSession(connector.Channel!, new MyConverter(), s => new MyHandler(s));
await session.SendAndFlushAsync(new MyMessage());
}
옵션 상세는 Document/03-Reference/Configuration.md 참고.
저장소 구조
| 경로 | 설명 |
|---|---|
Source/ |
라이브러리 7 패키지 |
Test/Communication.Tests |
xUnit 테스트 (dotnet test) |
Sandbox/Chat.TCP |
TCP 채팅 샘플 (--selftest 프로세스 내 왕복 검증) |
Sandbox/Chat.RUDP |
RUDP 채팅 샘플 (--selftest 프로세스 내 왕복 검증) |
Document/ |
Obsidian 문서 vault — 입구 Document/01-Overview/Home.md |
Legacy/ |
이전 스택·문서 아카이브 (유지보수 대상 아님) |
배포
v* 태그 → Communication.Shared, tcp/v* 태그 → TCP 3종, rudp/v* 태그 → RUDP 3종 (GitHub Actions nuget-publish.yml).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Communication.Shared (>= 2.3.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Communication.Network.TCP.Shared:
| Package | Downloads |
|---|---|
|
Communication.Network.TCP.Server
TCP server for DS_Communication: TcpListener runs the accept loop and hands each connected channel to the application, which creates and owns sessions. Pairs with Communication.Network.TCP.Shared/Client. Targets .NET Standard 2.1 — runs on modern .NET and Unity. |
|
|
Communication.Network.TCP.Client
TCP client for DS_Communication: TcpConnector establishes the connection and exposes a byte channel; the application creates and owns sessions on top. Pairs with Communication.Network.TCP.Shared/Server. Targets .NET Standard 2.1 — runs on modern .NET and Unity. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.7.0 | 140 | 9/13/2026 |
| 2.6.0 | 145 | 9/13/2026 |
| 2.5.2 | 138 | 9/13/2026 |
| 2.5.1 | 145 | 9/9/2026 |
| 2.5.0 | 151 | 9/8/2026 |
| 2.4.1 | 163 | 9/7/2026 |
| 2.4.0 | 153 | 9/7/2026 |
| 2.3.1 | 150 | 9/7/2026 |
| 2.3.0 | 142 | 9/7/2026 |
| 2.2.1 | 142 | 9/7/2026 |
| 2.2.0 | 144 | 9/7/2026 |
| 2.1.0 | 149 | 9/7/2026 |
| 2.0.1 | 149 | 9/7/2026 |
| 2.0.0 | 155 | 9/3/2026 |
| 1.0.2 | 118 | 7/11/2026 |
| 1.0.1 | 109 | 7/11/2026 |
| 1.0.0 | 105 | 5/2/2026 |