Comments (3)
There is no need to dispose TcpSession/SslSession as they will dispose wrapped Socket in public virtual bool Disconnect()
method. Other wrapped resources are not support IDisposable and will be managed by GC.
from netcoreserver.
Ok, so the GC discards the managed part, and the explicit disconnect disposes the unmanaged objects so they do not linger and consume resources?
from netcoreserver.
Sessions are disconnected by system network layer (e.g. when remote peer disconnects or network hangs) or when the server stops with DisconnectAll()
method. As the result sockets resources will be disposed. But sessions objects and their buffers will be handled by GC later as they are not IDisposable.
from netcoreserver.
Related Issues (20)
- Why the cache is not updated? HOT 7
- Add cache to the parent directory of index.html in InsertPathInternal? HOT 2
- Fix Bug: .NetFramework 4.8 ClientWebSocket Cann't Connect To .Net8 WsSession HOT 1
- Unhandled exception in WebSocket HOT 12
- Serialize and Deserialze HOT 3
- SimpleW : a RestAPI above NetCoreServer [not an issue but a library using NetCoreServer] HOT 1
- SslClient does not work in release mode
- Feature-Request: use BufferManager and SocketAsyncEventArgsPool to optimize memory
- netcoreserver is missing NuGet package README file
- WSS on Blazor WASM .NET 8
- 发送消息过快导致部分消息偶尔无法接受到 HOT 2
- Buffer-size in the 'OnReceived' methods can get too long HOT 3
- latency in reception of the first UDP frames (lazy?)
- Buffer.Reserve Wrong Condition? HOT 1
- TCP OnReceived(buffer, 0, received); HOT 1
- Cannot connect to WssChatServer for example
- TcpServer / TcpClient OptionKeepAlive have no effect HOT 2
- Cannot access a disposed object HOT 2
- Is there anyway to get WsOpcode in OnWsReceived?
- TcpSession.SendAsync() returns true even if a message fails to send. BytesSent also increases when send fails.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netcoreserver.