实例介绍
SuperSocket是一个高效的轻量级Socket服务器应用框架,它支持跨平台使用,并且提供了易于扩展的架构。该框架完全使用C#开发,能够方便地集成到任何使用.NET语言开发的系统中。
SuperSocket使得开发者可以不必深入研究Socket如何工作、如何使用Socket以及如何维护Socket连接等问题,就能轻松构建出始终在线的Socket应用程序。这一框架设计之初就考虑了易于扩展性,因此非常适合需要定制化开发的项目。
尽管SuperSocket提供了丰富的文档和指南帮助开发者上手,但在本文中我们不提供直接的链接访问。SuperSocket还通过Nuget发布了多个包,包括但不限于SuperSocket基础包、WebSocket服务器包、协议基础包、通道包、服务器包等,以满足不同开发需求。
SuperSocket的未来路线图包括更多的文档编写、性能测试与调优、修复现有功能的问题以及根据用户需求添加新功能等,旨在为开发者提供一个稳定、高效的Socket服务器应用开发框架。
【实例截图】
【核心代码】
文件清单
└── SuperSocket-27553dccc65ad88915343ba873a93f697b15efcb
├── Dependencies.props
├── Directory.Build.props
├── InternalsVisibleTo.cs
├── LICENSE
├── README.md
├── SuperSocket.sln
├── assets
│ └── supersocket.pfx
├── global.json
├── legacy
│ ├── SuperSocket.Engine.nuspec
│ ├── SuperSocket.WebSocket.nuspec
│ └── SuperSocket.nuspec
├── pkg
│ ├── SuperSocket.WebSocketServer.csproj
│ ├── SuperSocket.WebSocketServer.nuspec
│ ├── SuperSocket.csproj
│ └── SuperSocket.nuspec
├── samples
│ ├── AspNetSample
│ │ ├── AspNetSample.csproj
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ └── launchSettings.json
│ │ ├── appsettings.Development.json
│ │ └── appsettings.json
│ ├── BasicClient
│ │ ├── BasicClient.csproj
│ │ ├── MyPackage.cs
│ │ ├── MyPackageFilter.cs
│ │ └── Program.cs
│ ├── CommandServer
│ │ ├── ADD.cs
│ │ ├── CommandServer.csproj
│ │ ├── MULT.cs
│ │ ├── Program.cs
│ │ └── SUB.cs
│ ├── ConfigSample
│ │ ├── ConfigSample.csproj
│ │ ├── Program.cs
│ │ ├── appsettings.json
│ │ ├── appsettings.moreOptions.json
│ │ └── appsettings.tls.json
│ ├── CustomProtocol
│ │ ├── CustomProtocol.csproj
│ │ ├── MyPackage.cs
│ │ ├── MyPackageFilter.cs
│ │ └── Program.cs
│ ├── EchoServer
│ │ ├── EchoServer.csproj
│ │ └── Program.cs
│ ├── LiveChat
│ │ ├── ChatSession.cs
│ │ ├── ClientApp
│ │ │ ├── README.md
│ │ │ ├── angular.json
│ │ │ ├── package-lock.json
│ │ │ ├── package.json
│ │ │ ├── src
│ │ │ │ ├── app
│ │ │ │ │ ├── app.component.html
│ │ │ │ │ ├── app.component.ts
│ │ │ │ │ ├── app.module.ts
│ │ │ │ │ ├── app.server.module.ts
│ │ │ │ │ ├── login
│ │ │ │ │ │ ├── login.component.css
│ │ │ │ │ │ ├── login.component.html
│ │ │ │ │ │ └── login.component.ts
│ │ │ │ │ ├── nav-menu
│ │ │ │ │ │ ├── nav-menu.component.css
│ │ │ │ │ │ ├── nav-menu.component.html
│ │ │ │ │ │ └── nav-menu.component.ts
│ │ │ │ │ ├── room
│ │ │ │ │ │ ├── room.component.css
│ │ │ │ │ │ ├── room.component.html
│ │ │ │ │ │ └── room.component.ts
│ │ │ │ │ └── services
│ │ │ │ │ └── connectionService.ts
│ │ │ │ ├── assets
│ │ │ │ ├── environments
│ │ │ │ │ ├── environment.prod.ts
│ │ │ │ │ └── environment.ts
│ │ │ │ ├── index.html
│ │ │ │ ├── karma.conf.js
│ │ │ │ ├── main.ts
│ │ │ │ ├── polyfills.ts
│ │ │ │ ├── styles.css
│ │ │ │ ├── test.ts
│ │ │ │ ├── tsconfig.app.json
│ │ │ │ ├── tsconfig.server.json
│ │ │ │ ├── tsconfig.spec.json
│ │ │ │ └── tslint.json
│ │ │ ├── tsconfig.json
│ │ │ └── tslint.json
│ │ ├── Commands
│ │ │ ├── COMMAND_CON.cs
│ │ │ └── MSG.cs
│ │ ├── LiveChat.csproj
│ │ ├── Pages
│ │ │ ├── Error.cshtml
│ │ │ ├── Error.cshtml.cs
│ │ │ └── _ViewImports.cshtml
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ └── launchSettings.json
│ │ ├── RoomService.cs
│ │ ├── Startup.cs
│ │ ├── StringPackageConverter.cs
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ └── wwwroot
│ │ └── favicon.ico
│ ├── SwitchPipelineFilter
│ │ ├── PipelineFilterA.cs
│ │ ├── PipelineFilterB.cs
│ │ ├── SwitchPipelineFilter.cs
│ │ └── SwitchPipelineFilter.csproj
│ ├── WebSocketPushServer
│ │ ├── Dockerfile
│ │ ├── Program.cs
│ │ ├── PushSession.cs
│ │ ├── ServerPushMiddleware.cs
│ │ ├── WebSocketPushServer.csproj
│ │ ├── appsettings.json
│ │ └── docker-compose.yml
│ ├── WebSocketServer
│ │ ├── Program.cs
│ │ ├── WebSocketServer.csproj
│ │ └── appsettings.json
│ └── samples.sln
├── src
│ ├── SuperSocket.Channel
│ │ ├── ChannelBase.cs
│ │ ├── ChannelOptions.cs
│ │ ├── CloseReason.cs
│ │ ├── DefaultObjectPipe.cs
│ │ ├── Extensions.cs
│ │ ├── IChannel.cs
│ │ ├── IChannelWithRemoteCertificate.cs
│ │ ├── IChannelWithSessionIdentifier.cs
│ │ ├── IObjectPipe.cs
│ │ ├── IPipeChannel.cs
│ │ ├── IVirtualChannel.cs
│ │ ├── PipeChannel.cs
│ │ ├── RelayPipeChannel.cs
│ │ ├── SocketExtensions.cs
│ │ ├── SslStreamPipeChannel.cs
│ │ ├── StreamPipeChannel.cs
│ │ ├── SuperSocket.Channel.csproj
│ │ ├── TcpPipeChannel.cs
│ │ ├── UdpPipeChannel.cs
│ │ └── VirtualChannel.cs
│ ├── SuperSocket.Client
│ │ ├── ConnectState.cs
│ │ ├── ConnectorBase.cs
│ │ ├── EasyClient.cs
│ │ ├── IConnector.cs
│ │ ├── IEasyClient.cs
│ │ ├── PackageHandler.cs
│ │ ├── SecurityOptions.cs
│ │ ├── SocketConnector.cs
│ │ ├── SslStreamConnector.cs
│ │ └── SuperSocket.Client.csproj
│ ├── SuperSocket.Client.Proxy
│ │ ├── HttpConnector.cs
│ │ ├── ProxyConnectorBase.cs
│ │ ├── ProxyType.cs
│ │ ├── Socks4Connector.cs
│ │ ├── Socks5Connector.cs
│ │ └── SuperSocket.Client.Proxy.csproj
│ ├── SuperSocket.Command
│ │ ├── AsyncCommandFilter.cs
│ │ ├── CommandAttribute.cs
│ │ ├── CommandExecutingContext.cs
│ │ ├── CommandFilter.cs
│ │ ├── CommandMetadata.cs
│ │ ├── CommandMiddleware.cs
│ │ ├── CommandMiddlewareExtensions.cs
│ │ ├── CommandOptions.cs
│ │ ├── CommandWrap.cs
│ │ ├── ICommand.cs
│ │ ├── ICommandSource.cs
│ │ ├── IPackageMapper.cs
│ │ ├── JsonCommand.cs
│ │ └── SuperSocket.Command.csproj
│ ├── SuperSocket.GZip
│ │ ├── GZipConnector.cs
│ │ ├── GZipEasyClient.cs
│ │ ├── GZipReadWriteStream.cs
│ │ ├── GZipTcpChannelCreatorFactory.cs
│ │ ├── HostBuilderExtensions.cs
│ │ └── SuperSocket.GZip.csproj
│ ├── SuperSocket.Http
│ │ ├── HttpPipelineFilter.cs
│ │ ├── HttpRequest.cs
│ │ └── SuperSocket.Http.csproj
│ ├── SuperSocket.Primitives
│ │ ├── AsyncEventHandler.cs
│ │ ├── AsyncParallel.cs
│ │ ├── AsyncToSyncSessionContainerWrapper.cs
│ │ ├── CertificateOptions.cs
│ │ ├── DefaultStringEncoder.cs
│ │ ├── DefaultStringPackageDecoder.cs
│ │ ├── DelegatePackageHandler.cs
│ │ ├── Extensions.cs
│ │ ├── HostBuilderExtensions.cs
│ │ ├── IAppSession.cs
│ │ ├── IChannelCreator.cs
│ │ ├── IChannelCreatorFactory.cs
│ │ ├── IChannelRegister.cs
│ │ ├── IHandshakeRequiredSession.cs
│ │ ├── ILoggerAccessor.cs
│ │ ├── IMiddleware.cs
│ │ ├── IMinimalApiHostBuilder.cs
│ │ ├── IPackageHandler.cs
│ │ ├── IPackageHandlingScheduler.cs
│ │ ├── IServer.cs
│ │ ├── IServerInfo.cs
│ │ ├── ISessionContainer.cs
│ │ ├── ISessionFactory.cs
│ │ ├── ISuperSocketHostBuilder.cs
│ │ ├── ListenOptions.cs
│ │ ├── MiddlewareBase.cs
│ │ ├── PackageHandlingException.cs
│ │ ├── ServerOptions.cs
│ │ ├── ServerState.cs
│ │ ├── SessionContainerExtensions.cs
│ │ ├── SessionState.cs
│ │ ├── SuperSocket.Primitives.csproj
│ │ └── SyncToAsyncSessionContainerWrapper.cs
│ ├── SuperSocket.ProtoBase
│ │ ├── BeginEndMarkPipelineFilter.cs
│ │ ├── CommandLinePipelineFilter.cs
│ │ ├── DefaultPipelineFilterFactory.cs
│ │ ├── DelegatePipelineFilterFactory.cs
│ │ ├── Extensions.cs
│ │ ├── FixedHeaderPipelineFilter.cs
│ │ ├── FixedSizePipelineFilter.cs
│ │ ├── IKeyedPackageInfo.cs
│ │ ├── IPackageDecoder.cs
│ │ ├── IPackageEncoder.cs
│ │ ├── IPackagePartReader.cs
│ │ ├── IPipelineFilter.cs
│ │ ├── IPipelineFilterFactory.cs
│ │ ├── IStringPackage.cs
│ │ ├── LinePipelineFilter.cs
│ │ ├── PackagePartsPipelineFilter.cs
│ │ ├── PipelineFilterBase.cs
│ │ ├── PipelineFilterFactoryBase.cs
│ │ ├── ProtocolException.cs
│ │ ├── SequenceSegment.cs
│ │ ├── StringPackageInfo.cs
│ │ ├── SuperSocket.ProtoBase.csproj
│ │ ├── TerminatorPipelineFilter.cs
│ │ ├── TerminatorTextPipelineFilter.cs
│ │ ├── TextPackageInfo.cs
│ │ └── TransparentPipelineFilter.cs
│ ├── SuperSocket.Server
│ │ ├── AppSession.cs
│ │ ├── ClearIdleSessionMiddleware.cs
│ │ ├── ConcurrentPackageHandlingScheduler.cs
│ │ ├── DefaultSessionFactory.cs
│ │ ├── DefaultStringEncoderForDI.cs
│ │ ├── GenericSessionFactory.cs
│ │ ├── HostBuilderAdapter.cs
│ │ ├── HostBuilderExtensions.cs
│ │ ├── IConfigureContainerAdapter.cs
│ │ ├── IPackageHandlingContextAccessor.cs
│ │ ├── ISessionEventHost.cs
│ │ ├── MultipleServerHostBuilder.cs
│ │ ├── PackageHandlingContext.cs
│ │ ├── PackageHandlingContextAccessor.cs
│ │ ├── PackageHandlingSchedulerBase.cs
│ │ ├── SerialPackageHandlingScheduler.cs
│ │ ├── ServerHostBuilderAdapter.cs
│ │ ├── SessionHandlers.cs
│ │ ├── SocketOptionsSetter.cs
│ │ ├── SuperSocket.Server.csproj
│ │ ├── SuperSocketExtensions.cs
│ │ ├── SuperSocketHostBuilder.cs
│ │ ├── SuperSocketService.cs
│ │ ├── TcpChannelCreator.cs
│ │ └── TcpChannelCreatorFactory.cs
│ ├── SuperSocket.SessionContainer
│ │ ├── InProcSessionContainerMiddleware.cs
│ │ ├── InProcSessionContainerMiddlewareExtensions.cs
│ │ └── SuperSocket.SessionContainer.csproj
│ ├── SuperSocket.Udp
│ │ ├── IPAddressUdpSessionIdentifierProvider.cs
│ │ ├── IUdpSessionIdentifierProvider.cs
│ │ ├── SuperSocket.Udp.csproj
│ │ ├── UdpChannelCreator.cs
│ │ ├── UdpChannelCreatorFactory.cs
│ │ └── UdpServerHostBuilderExtensions.cs
│ ├── SuperSocket.WebSocket
│ │ ├── CloseReason.cs
│ │ ├── CloseStatus.cs
│ │ ├── ExtensionMethods.cs
│ │ ├── Extensions
│ │ │ ├── Compression
│ │ │ │ ├── ReadOnlySequenceStream.cs
│ │ │ │ ├── WebSocketPerMessageCompressionExtension.cs
│ │ │ │ └── WritableSequenceStream.cs
│ │ │ └── IWebSocketExtension.cs
│ │ ├── FramePartReader
│ │ │ ├── ExtendedLengthReader.cs
│ │ │ ├── FixPartReader.cs
│ │ │ ├── MaskKeyReader.cs
│ │ │ ├── PackagePartReader.cs
│ │ │ └── PayloadDataReader.cs
│ │ ├── HttpHeader.cs
│ │ ├── IWebSocketFrameHeader.cs
│ │ ├── OpCode.cs
│ │ ├── SuperSocket.WebSocket.csproj
│ │ ├── WebSocketConstant.cs
│ │ ├── WebSocketDataPipelineFilter.cs
│ │ ├── WebSocketEncoder.cs
│ │ ├── WebSocketPackage.cs
│ │ ├── WebSocketPipelineFilter.cs
│ │ └── WebSocketPipelineFilterContext.cs
│ └── SuperSocket.WebSocket.Server
│ ├── CommandSubProtocolHandler.cs
│ ├── DelegateSubProtocolHandler.cs
│ ├── Extensions
│ │ ├── Compression
│ │ │ └── WebSocketPerMessageCompressionExtensionFactory.cs
│ │ └── IWebSocketExtensionFactory.cs
│ ├── HandshakeOptions.cs
│ ├── ISubProtocolHandler.cs
│ ├── SubProtocolHandlerBase.cs
│ ├── SuperSocket.WebSocket.Server.csproj
│ ├── WebSocketCommandMiddleware.cs
│ ├── WebSocketHostBuilder.cs
│ ├── WebSocketHostBuilderExtensions.cs
│ ├── WebSocketPackageHandler.cs
│ ├── WebSocketServerMiddleware.cs
│ └── WebSocketSession.cs
├── test
│ ├── SuperSocket.Benchmarks
│ │ ├── CurrentSend.cs
│ │ ├── Program.cs
│ │ ├── StringDecode.cs
│ │ ├── SuperSocket.Benchmarks.csproj
│ │ └── TransparentPipeChannel.cs
│ ├── SuperSocket.Tests
│ │ ├── AspNetIntegrationTest.cs
│ │ ├── AutofacTest.cs
│ │ ├── BeginEndMarkProtocolTest.cs
│ │ ├── ClientTest.cs
│ │ ├── CommandTest.cs
│ │ ├── Commands.cs
│ │ ├── Config
│ │ │ └── multiple_server.json
│ │ ├── ConsoleWriter.cs
│ │ ├── DerivedNetworkStream.cs
│ │ ├── Extensions.cs
│ │ ├── FixedHeaderProtocolTest.cs
│ │ ├── FixedSizeProtocolTest.cs
│ │ ├── GzipHostConfigurator.cs
│ │ ├── GzipSecureHostConfigurator.cs
│ │ ├── HttpPipelineFilterTest.cs
│ │ ├── IHostConfigurator.cs
│ │ ├── MainTest.cs
│ │ ├── ObjectPipeTest.cs
│ │ ├── PackageHandlingContextAccessorTest.cs
│ │ ├── ProtocolTestBase.cs
│ │ ├── RegularHostConfigurator.cs
│ │ ├── SecureHostConfigurator.cs
│ │ ├── SequenceReaderExtensionTest.cs
│ │ ├── ServerOptionsTest.cs
│ │ ├── SessionContainerTest.cs
│ │ ├── SessionTest.cs
│ │ ├── SuperSocket.Tests.csproj
│ │ ├── SwitchProtocolTest.cs
│ │ ├── TaskTestResult.cs
│ │ ├── TcpHostConfigurator.cs
│ │ ├── TerminatorProtocolTest.cs
│ │ ├── TestClassBase.cs
│ │ ├── UdpChannelStream.cs
│ │ ├── UdpHostConfigurator.cs
│ │ ├── UdpTextReader.cs
│ │ ├── WebSocket
│ │ │ ├── StringPackageConverter.cs
│ │ │ ├── WebSocketBasicTest.cs
│ │ │ └── WebSocketServerTestBase.cs
│ │ ├── appsettings.json
│ │ └── xunit.runner.json
│ ├── SuperSocket.Tests.Command
│ │ ├── MIN.cs
│ │ ├── SORT.cs
│ │ └── SuperSocket.Tests.Command.csproj
│ └── apptest
│ ├── UnitTest1.cs
│ └── apptest.csproj
├── unlist.sh
└── version.json
55 directories, 342 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论