Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 6 additions & 5 deletions Protocols/WebSocket/WebSocketServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public WebSocketServer(IEnumerable<ISubProtocol<TWebSocketSession>> subProtocols
public WebSocketServer(ISubProtocol<TWebSocketSession> subProtocol)
: this(new List<ISubProtocol<TWebSocketSession>> { subProtocol })
{

}

/// <summary>
Expand Down Expand Up @@ -244,7 +244,7 @@ private bool SetupSubProtocols(IServerConfig config)
{
string originalProtocolName = protocolConfig.Name;
string protocolName;

ISubProtocol<TWebSocketSession> subProtocolInstance;

if (!string.IsNullOrEmpty(originalProtocolName))
Expand Down Expand Up @@ -328,7 +328,7 @@ private bool SetupSubProtocols(IServerConfig config)
return false;
}
}

return true;
}

Expand Down Expand Up @@ -652,7 +652,7 @@ protected override bool SetupCommands(Dictionary<string, ICommand<TWebSocketSess
var commands = new List<ICommand<TWebSocketSession, IWebSocketFragment>>
{
new HandShake<TWebSocketSession>(),
new Text<TWebSocketSession>(),
new Text<TWebSocketSession>(),
new Binary<TWebSocketSession>(),
new Close<TWebSocketSession>(),
new Ping<TWebSocketSession>(),
Expand Down Expand Up @@ -772,7 +772,8 @@ private void SendRawDataToSession(object state)

try
{
sendOk = session.TrySendRawData(param.Data);
session.SendRawData(param.Data);
sendOk = true;
}
catch (Exception e)
{
Expand Down
9 changes: 9 additions & 0 deletions Protocols/WebSocket/WebSocketSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,15 @@ bool IWebSocketSession.TrySendRawData(byte[] data, int offset, int length)
return base.TrySend(new ArraySegment<byte>(data, offset, length));
}

/// <summary>
/// Sends raw data segments.
/// </summary>
/// <param name="segments">The segments.</param>
internal void SendRawData(IList<ArraySegment<byte>> segments)
{
base.Send(segments);
}

/// <summary>
/// Tries the send raw data segments.
/// </summary>
Expand Down