Communication.Network.TCP.Server
2.5.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Communication.Network.TCP.Server --version 2.5.1
NuGet\Install-Package Communication.Network.TCP.Server -Version 2.5.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Communication.Network.TCP.Server" Version="2.5.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Communication.Network.TCP.Server" Version="2.5.1" />
<PackageReference Include="Communication.Network.TCP.Server" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Communication.Network.TCP.Server --version 2.5.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Communication.Network.TCP.Server, 2.5.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Communication.Network.TCP.Server@2.5.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Communication.Network.TCP.Server&version=2.5.1
#tool nuget:?package=Communication.Network.TCP.Server&version=2.5.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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회 통지. 재접속·하트비트는 앱 책임.
전송 보안 (옵션)
- TCP TLS(SslStream) —
TcpTransportOptions.Tls: 서버는ServerCertificate설정, 클라이언트는 옵션만 설정(기본 OS 인증서 검증). 핸드셰이크 상한 기본 15초(슬로로리스 방어). 기본null은 평문 — 하위호환. - RUDP 패킷 무결성(CRC32c) —
RudpTransportOptions.Crc32cEnabled(양단 같은 설정 필요): 체크섬 위반 패킷(손상·위조)을 프로토콜 처리 전에 폐기. 검출 전용 — 기밀성·인증은 없음. - RUDP 기본 연결 키는 공개 상수다 — 기본값으로 서버 시작 시 Trace 경고. 공개망에서는 앱별 값으로 교체.
상세: Document/04-Guides/Security.md · Document/04-Guides/Getting-Started.md §6
빠른 시작
// 서버 — 수락된 채널 위에 세션은 앱이 만든다.
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- Communication.Network.TCP.Shared (>= 2.5.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.7.0 | 79 | 9/13/2026 |
| 2.6.0 | 83 | 9/13/2026 |
| 2.5.2 | 81 | 9/13/2026 |
| 2.5.1 | 96 | 9/9/2026 |
| 2.5.0 | 91 | 9/8/2026 |
| 2.4.1 | 100 | 9/7/2026 |
| 2.4.0 | 92 | 9/7/2026 |
| 2.3.1 | 98 | 9/7/2026 |
| 2.3.0 | 98 | 9/7/2026 |
| 2.2.1 | 83 | 9/7/2026 |
| 2.2.0 | 81 | 9/7/2026 |
| 2.1.0 | 91 | 9/7/2026 |
| 2.0.1 | 92 | 9/7/2026 |
| 2.0.0 | 96 | 9/3/2026 |
| 1.0.2 | 121 | 7/11/2026 |
| 1.0.1 | 114 | 7/11/2026 |
| 1.0.0 | 116 | 5/2/2026 |