diff --git a/Src/SocketIoClientDotNet.Tests.net35/SocketIoClientDotNet.Tests.net35.v3.ncrunchproject b/Src/SocketIoClientDotNet.Tests.net35/SocketIoClientDotNet.Tests.net35.v3.ncrunchproject index 9a0108d..6800b4a 100644 --- a/Src/SocketIoClientDotNet.Tests.net35/SocketIoClientDotNet.Tests.net35.v3.ncrunchproject +++ b/Src/SocketIoClientDotNet.Tests.net35/SocketIoClientDotNet.Tests.net35.v3.ncrunchproject @@ -1,118 +1,5 @@  - - - SocketIoClientDotNet.Tests.ParserTests.ByteArrayTest - - - SocketIoClientDotNet.Tests.ParserTests.ParserTest - - - SocketIoClientDotNet.Tests.ModuleTests.HasBinaryDataTest - - - SocketIoClientDotNet.Tests.ModuleTests.HasBinaryDataTest.ByteArray - - - SocketIoClientDotNet.Tests.ClientTests.UrlTest - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.BuffAck - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.Connect - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.D100000CharsTest - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.D10000CharsTest - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.DoubleCallTest - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.Json10000000CharsTest - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.Json10000CharsTest - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.MessageTest - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ReconnectEventShouldFireInSocket - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldEmitDateAsDate - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldEmitDateInObject - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireErrorOnSocket - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireReconnectEventsOnSocket - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireReconnectingOnSocketWithAttemptsNumberWhenReconnectingTwice - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldGetBase64DataAsALastResort - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldGetBinaryDataAsAnArraybuffer - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotConnectWhenAutoconnectOptionSetToFalse - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotTryToReconnectAndShouldFormAConnectionWhenConnectingToCorrectPortWithDefaultTimeout - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotTryToReconnectWithIncorrectPortWhenReconnectionDisabled - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldOpenANewNamespaceAfterConnectionGetsClosed - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveDateWithAck - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveDateWithAckAsAction - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveUtf8MultibyteCharacters - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReconnectByDefault - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendBinaryDataAsAnArraybuffer - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendBinaryDataAsAnArraybufferMixedWithJson - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendEventsWithArraybuffersInTheCorrectOrder - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldTryToReconnectTwiceAndFailWhenRequestedTwoAttemptsWithImmediateTimeoutAndReconnectEnabled - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldTryToReconnectTwiceAndFailWhenRequestedTwoAttemptsWithIncorrectAddressAndReconnectEnabled - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldWorkWithAcks - - - SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldWorkWithFalse - - True \ No newline at end of file diff --git a/Src/SocketIoClientDotNet.Tests.net40/SocketIoClientDotNet.Tests.net40.v3.ncrunchproject b/Src/SocketIoClientDotNet.Tests.net40/SocketIoClientDotNet.Tests.net40.v3.ncrunchproject index 34e4dec..e5a59cc 100644 --- a/Src/SocketIoClientDotNet.Tests.net40/SocketIoClientDotNet.Tests.net40.v3.ncrunchproject +++ b/Src/SocketIoClientDotNet.Tests.net40/SocketIoClientDotNet.Tests.net40.v3.ncrunchproject @@ -2,16 +2,100 @@ - SocketIoClientDotNet.Tests.ParserTests.ByteArrayTest - - - SocketIoClientDotNet.Tests.ParserTests.ParserTest - - - SocketIoClientDotNet.Tests.ModuleTests.HasBinaryDataTest + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest - SocketIoClientDotNet.Tests.ModuleTests.HasBinaryDataTest.ByteArray + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.BuffAck + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.Connect + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.D100000CharsTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.D10000CharsTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.DoubleCallTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.Json10000000CharsTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.Json10000CharsTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.MessageTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ReconnectEventShouldFireInSocket + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldEmitDateAsDate + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldEmitDateInObject + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireErrorOnSocket + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireReconnectEventsOnSocket + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireReconnectingOnSocketWithAttemptsNumberWhenReconnectingTwice + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldGetBase64DataAsALastResort + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldGetBinaryDataAsAnArraybuffer + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotConnectWhenAutoconnectOptionSetToFalse + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotTryToReconnectAndShouldFormAConnectionWhenConnectingToCorrectPortWithDefaultTimeout + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotTryToReconnectWithIncorrectPortWhenReconnectionDisabled + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldOpenANewNamespaceAfterConnectionGetsClosed + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveDateWithAck + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveDateWithAckAsAction + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveUtf8MultibyteCharacters + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReconnectByDefault + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendBinaryDataAsAnArraybuffer + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendBinaryDataAsAnArraybufferMixedWithJson + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendEventsWithArraybuffersInTheCorrectOrder + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldTryToReconnectTwiceAndFailWhenRequestedTwoAttemptsWithImmediateTimeoutAndReconnectEnabled + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldTryToReconnectTwiceAndFailWhenRequestedTwoAttemptsWithIncorrectAddressAndReconnectEnabled + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldWorkWithAcks + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldWorkWithFalse SocketIoClientDotNet.Tests.ClientTests.UrlTest @@ -28,6 +112,18 @@ SocketIoClientDotNet.Tests.ClientTests.UrlTest.ParseRelativePath + + SocketIoClientDotNet.Tests.ModuleTests.HasBinaryDataTest + + + SocketIoClientDotNet.Tests.ModuleTests.HasBinaryDataTest.ByteArray + + + SocketIoClientDotNet.Tests.ParserTests.ByteArrayTest + + + SocketIoClientDotNet.Tests.ParserTests.ParserTest + True diff --git a/Src/SocketIoClientDotNet.Tests.net45/SocketIoClientDotNet.Tests.net45.v3.ncrunchproject b/Src/SocketIoClientDotNet.Tests.net45/SocketIoClientDotNet.Tests.net45.v3.ncrunchproject index 1e39c44..01e6e7d 100644 --- a/Src/SocketIoClientDotNet.Tests.net45/SocketIoClientDotNet.Tests.net45.v3.ncrunchproject +++ b/Src/SocketIoClientDotNet.Tests.net45/SocketIoClientDotNet.Tests.net45.v3.ncrunchproject @@ -2,17 +2,113 @@ - SocketIoClientDotNet.Tests.ModuleTests.HasBinaryDataTest + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest - SocketIoClientDotNet.Tests.ModuleTests.HasBinaryDataTest.ByteArray + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.BuffAck + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.Connect + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.Cookie + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.D100000CharsTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.D10000CharsTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.DoubleCallTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.Json10000000CharsTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.Json10000CharsTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.MessageTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.MessageTestHebrew + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.OgsMessageTest + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ReconnectEventShouldFireInSocket + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldEmitDateAsDate + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldEmitDateInObject + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireErrorOnSocket + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireReconnectEventsOnSocket + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireReconnectingOnSocketWithAttemptsNumberWhenReconnectingTwice + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldGetBase64DataAsALastResort + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldGetBinaryDataAsAnArraybuffer + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotConnectWhenAutoconnectOptionSetToFalse + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotTryToReconnectAndShouldFormAConnectionWhenConnectingToCorrectPortWithDefaultTimeout + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotTryToReconnectWithIncorrectPortWhenReconnectionDisabled + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldOpenANewNamespaceAfterConnectionGetsClosed + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveDateWithAck + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveDateWithAckAsAction + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveUtf8MultibyteCharacters + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReconnectByDefault + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendBinaryDataAsAnArraybuffer + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendBinaryDataAsAnArraybufferMixedWithJson + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendEventsWithArraybuffersInTheCorrectOrder + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldTryToReconnectTwiceAndFailWhenRequestedTwoAttemptsWithImmediateTimeoutAndReconnectEnabled + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldTryToReconnectTwiceAndFailWhenRequestedTwoAttemptsWithIncorrectAddressAndReconnectEnabled + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldWorkWithAcks + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldWorkWithAcks2 + + + SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldWorkWithFalse - - SocketIoClientDotNet.Tests.ParserTests.ByteArrayTest - - - SocketIoClientDotNet.Tests.ParserTests.ParserTest - SocketIoClientDotNet.Tests.ClientTests.UrlTest @@ -28,6 +124,18 @@ SocketIoClientDotNet.Tests.ClientTests.UrlTest.ParseRelativePath + + SocketIoClientDotNet.Tests.ModuleTests.HasBinaryDataTest + + + SocketIoClientDotNet.Tests.ModuleTests.HasBinaryDataTest.ByteArray + + + SocketIoClientDotNet.Tests.ParserTests.ByteArrayTest + + + SocketIoClientDotNet.Tests.ParserTests.ParserTest + True diff --git a/Src/SocketIoClientDotNet.net45/Parser/Packet.cs b/Src/SocketIoClientDotNet.net45/Parser/Packet.cs index 32d76de..963d90d 100644 --- a/Src/SocketIoClientDotNet.net45/Parser/Packet.cs +++ b/Src/SocketIoClientDotNet.net45/Parser/Packet.cs @@ -58,15 +58,17 @@ public List GetDataAsList() var args = new List(); foreach (var o in jarray) { - if (o is JValue jval) + if (o is JValue) { + var jval = (JValue)o; if (jval != null) { args.Add(jval.Value); } } - else if (o is JToken jtoken) + else if (o is JToken) { + var jtoken = (JToken)o; if (jtoken != null) { args.Add(jtoken); @@ -83,15 +85,8 @@ public static JArray Args2JArray(IEnumerable _args) var jsonArgs = new JArray(); foreach (var o in _args) { - if (!(o is string)) - { - var obj = JObject.FromObject(o); - jsonArgs.Add(obj); - } - else - jsonArgs.Add(o); + jsonArgs.Add(o); } - return jsonArgs; } @@ -108,5 +103,7 @@ public static JArray Remove(JArray a, int pos) } return na; } + + } } diff --git a/TestServer/test.txt b/TestServer/test.txt index 78083bc..2ce2942 100644 --- a/TestServer/test.txt +++ b/TestServer/test.txt @@ -1 +1 @@ -testcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקה \ No newline at end of file +testcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקה \ No newline at end of file diff --git a/grunt/config.json b/grunt/config.json index 8ae38eb..5282e8d 100644 --- a/grunt/config.json +++ b/grunt/config.json @@ -1,5 +1,5 @@ { - "version":"1.0.7", + "version":"1.0.7.1", "server":{ "port":80, "ssl_port":443,