Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RioServer send to client not work #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,11 @@ public sealed class TcpSocketRioSession : IDisposable
ITcpSocketRioServerEventDispatcher dispatcher,
TcpSocketRioServer server)
{
if (configuration == null)
throw new ArgumentNullException("configuration");
if (bufferManager == null)
throw new ArgumentNullException("bufferManager");
if (socket == null)
throw new ArgumentNullException("socket");
if (dispatcher == null)
throw new ArgumentNullException("dispatcher");
if (server == null)
throw new ArgumentNullException("server");

_configuration = configuration;
_bufferManager = bufferManager;
_socket = socket;
_dispatcher = dispatcher;
_server = server;
_configuration = configuration ?? throw new ArgumentNullException("configuration");
_bufferManager = bufferManager ?? throw new ArgumentNullException("bufferManager");
_socket = socket ?? throw new ArgumentNullException("socket");
_dispatcher = dispatcher ?? throw new ArgumentNullException("dispatcher");
_server = server ?? throw new ArgumentNullException("server");

_sessionKey = Guid.NewGuid().ToString();
this.StartTime = DateTime.UtcNow;
Expand Down Expand Up @@ -387,6 +376,8 @@ public async Task SendAsync(byte[] data, int offset, int count)
_configuration.FrameBuilder.Encoder.EncodeFrame(data, offset, count, out frameBuffer, out frameBufferOffset, out frameBufferLength);

await _stream.WriteAsync(frameBuffer, frameBufferOffset, frameBufferLength);
_stream.Flush();

}
catch (Exception ex)
{
Expand Down