diff --git a/src/HiSocket.Example/App.config b/src/HiSocket.Example/App.config index 731f6de..343984d 100644 --- a/src/HiSocket.Example/App.config +++ b/src/HiSocket.Example/App.config @@ -1,6 +1,6 @@ - + - - - \ No newline at end of file + + + diff --git a/src/HiSocket.Example/HiSocket.Example.csproj b/src/HiSocket.Example/HiSocket.Example.csproj index eda3744..90fe7a3 100644 --- a/src/HiSocket.Example/HiSocket.Example.csproj +++ b/src/HiSocket.Example/HiSocket.Example.csproj @@ -8,9 +8,10 @@ Exe HiSocket.Example HiSocket.Example - v4.6.1 + v3.5 512 true + Unity Subset v3.5 AnyCPU diff --git a/src/HiSocket.Example/bin/Debug/HiSocket.Example.exe b/src/HiSocket.Example/bin/Debug/HiSocket.Example.exe index 0280cff..f123b32 100644 Binary files a/src/HiSocket.Example/bin/Debug/HiSocket.Example.exe and b/src/HiSocket.Example/bin/Debug/HiSocket.Example.exe differ diff --git a/src/HiSocket.Example/bin/Debug/HiSocket.Example.exe.config b/src/HiSocket.Example/bin/Debug/HiSocket.Example.exe.config index 731f6de..343984d 100644 --- a/src/HiSocket.Example/bin/Debug/HiSocket.Example.exe.config +++ b/src/HiSocket.Example/bin/Debug/HiSocket.Example.exe.config @@ -1,6 +1,6 @@ - + - - - \ No newline at end of file + + + diff --git a/src/HiSocket.Example/bin/Debug/HiSocket.Example.pdb b/src/HiSocket.Example/bin/Debug/HiSocket.Example.pdb index 4b3c5ab..c240139 100644 Binary files a/src/HiSocket.Example/bin/Debug/HiSocket.Example.pdb and b/src/HiSocket.Example/bin/Debug/HiSocket.Example.pdb differ diff --git a/src/HiSocket.Example/bin/Debug/HiSocket.Message.dll b/src/HiSocket.Example/bin/Debug/HiSocket.Message.dll index 1cb96fc..be71266 100644 Binary files a/src/HiSocket.Example/bin/Debug/HiSocket.Message.dll and b/src/HiSocket.Example/bin/Debug/HiSocket.Message.dll differ diff --git a/src/HiSocket.Example/bin/Debug/HiSocket.Message.pdb b/src/HiSocket.Example/bin/Debug/HiSocket.Message.pdb index a40cd36..9aeb8c9 100644 Binary files a/src/HiSocket.Example/bin/Debug/HiSocket.Message.pdb and b/src/HiSocket.Example/bin/Debug/HiSocket.Message.pdb differ diff --git a/src/HiSocket.Example/bin/Debug/HiSocket.dll b/src/HiSocket.Example/bin/Debug/HiSocket.dll index a11c971..58cf308 100644 Binary files a/src/HiSocket.Example/bin/Debug/HiSocket.dll and b/src/HiSocket.Example/bin/Debug/HiSocket.dll differ diff --git a/src/HiSocket.Example/bin/Debug/HiSocket.pdb b/src/HiSocket.Example/bin/Debug/HiSocket.pdb index 910c06d..2c3e1e3 100644 Binary files a/src/HiSocket.Example/bin/Debug/HiSocket.pdb and b/src/HiSocket.Example/bin/Debug/HiSocket.pdb differ diff --git a/src/HiSocket.Example/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/src/HiSocket.Example/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 37bdbcd..f007ef5 100644 Binary files a/src/HiSocket.Example/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/src/HiSocket.Example/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/src/HiSocket.Example/obj/Debug/HiSocket.Example.csproj.CoreCompileInputs.cache b/src/HiSocket.Example/obj/Debug/HiSocket.Example.csproj.CoreCompileInputs.cache index bd57de2..0856c40 100644 --- a/src/HiSocket.Example/obj/Debug/HiSocket.Example.csproj.CoreCompileInputs.cache +++ b/src/HiSocket.Example/obj/Debug/HiSocket.Example.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -f30679e8703ee0bde5a883148d1cfe583578e62f +bfe03b0b643ce2cb02f88d3aac3eb1d5b32f5a25 diff --git a/src/HiSocket.Example/obj/Debug/HiSocket.Example.csprojAssemblyReference.cache b/src/HiSocket.Example/obj/Debug/HiSocket.Example.csprojAssemblyReference.cache index af066e9..f212f4e 100644 Binary files a/src/HiSocket.Example/obj/Debug/HiSocket.Example.csprojAssemblyReference.cache and b/src/HiSocket.Example/obj/Debug/HiSocket.Example.csprojAssemblyReference.cache differ diff --git a/src/HiSocket.Example/obj/Debug/HiSocket.Example.exe b/src/HiSocket.Example/obj/Debug/HiSocket.Example.exe index 0280cff..f123b32 100644 Binary files a/src/HiSocket.Example/obj/Debug/HiSocket.Example.exe and b/src/HiSocket.Example/obj/Debug/HiSocket.Example.exe differ diff --git a/src/HiSocket.Example/obj/Debug/HiSocket.Example.pdb b/src/HiSocket.Example/obj/Debug/HiSocket.Example.pdb index 4b3c5ab..c240139 100644 Binary files a/src/HiSocket.Example/obj/Debug/HiSocket.Example.pdb and b/src/HiSocket.Example/obj/Debug/HiSocket.Example.pdb differ diff --git a/src/HiSocket.Message/HiSocket.Message.csproj b/src/HiSocket.Message/HiSocket.Message.csproj index 52ff764..af89cec 100644 --- a/src/HiSocket.Message/HiSocket.Message.csproj +++ b/src/HiSocket.Message/HiSocket.Message.csproj @@ -11,6 +11,7 @@ HiSocket.Message v3.5 512 + Unity Subset v3.5 true diff --git a/src/HiSocket.Message/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/src/HiSocket.Message/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index c29acf4..95809d2 100644 Binary files a/src/HiSocket.Message/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/src/HiSocket.Message/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/src/HiSocket.Message/obj/Debug/HiSocket.Message.csproj.CoreCompileInputs.cache b/src/HiSocket.Message/obj/Debug/HiSocket.Message.csproj.CoreCompileInputs.cache index b341fff..b4a65f9 100644 --- a/src/HiSocket.Message/obj/Debug/HiSocket.Message.csproj.CoreCompileInputs.cache +++ b/src/HiSocket.Message/obj/Debug/HiSocket.Message.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -a9d6d1160fc5262789cd2aa4fa606d957210502b +85163093e10efbb4350ab8970a86af5be6cb488c diff --git a/src/HiSocket.Message/obj/Debug/HiSocket.Message.csprojAssemblyReference.cache b/src/HiSocket.Message/obj/Debug/HiSocket.Message.csprojAssemblyReference.cache index 7258a69..c40a596 100644 Binary files a/src/HiSocket.Message/obj/Debug/HiSocket.Message.csprojAssemblyReference.cache and b/src/HiSocket.Message/obj/Debug/HiSocket.Message.csprojAssemblyReference.cache differ diff --git a/src/HiSocket.Message/obj/Debug/HiSocket.Message.dll b/src/HiSocket.Message/obj/Debug/HiSocket.Message.dll index 1cb96fc..be71266 100644 Binary files a/src/HiSocket.Message/obj/Debug/HiSocket.Message.dll and b/src/HiSocket.Message/obj/Debug/HiSocket.Message.dll differ diff --git a/src/HiSocket.Message/obj/Debug/HiSocket.Message.pdb b/src/HiSocket.Message/obj/Debug/HiSocket.Message.pdb index a40cd36..9aeb8c9 100644 Binary files a/src/HiSocket.Message/obj/Debug/HiSocket.Message.pdb and b/src/HiSocket.Message/obj/Debug/HiSocket.Message.pdb differ diff --git a/src/HiSocket.Test/HiSocket.Test.csproj b/src/HiSocket.Test/HiSocket.Test.csproj index 4e9a0c8..539574f 100644 --- a/src/HiSocket.Test/HiSocket.Test.csproj +++ b/src/HiSocket.Test/HiSocket.Test.csproj @@ -9,7 +9,7 @@ Properties HiSocket.Test HiSocket.Test - v4.6.1 + v4.6 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15.0 @@ -19,6 +19,7 @@ UnitTest + true diff --git a/src/HiSocket.Test/bin/Debug/HiSocket.Message.dll b/src/HiSocket.Test/bin/Debug/HiSocket.Message.dll index 1cb96fc..be71266 100644 Binary files a/src/HiSocket.Test/bin/Debug/HiSocket.Message.dll and b/src/HiSocket.Test/bin/Debug/HiSocket.Message.dll differ diff --git a/src/HiSocket.Test/bin/Debug/HiSocket.Message.pdb b/src/HiSocket.Test/bin/Debug/HiSocket.Message.pdb index a40cd36..9aeb8c9 100644 Binary files a/src/HiSocket.Test/bin/Debug/HiSocket.Message.pdb and b/src/HiSocket.Test/bin/Debug/HiSocket.Message.pdb differ diff --git a/src/HiSocket.Test/bin/Debug/HiSocket.Test.dll b/src/HiSocket.Test/bin/Debug/HiSocket.Test.dll index b4793b9..88e23e0 100644 Binary files a/src/HiSocket.Test/bin/Debug/HiSocket.Test.dll and b/src/HiSocket.Test/bin/Debug/HiSocket.Test.dll differ diff --git a/src/HiSocket.Test/bin/Debug/HiSocket.Test.pdb b/src/HiSocket.Test/bin/Debug/HiSocket.Test.pdb index 69162f0..419aee9 100644 Binary files a/src/HiSocket.Test/bin/Debug/HiSocket.Test.pdb and b/src/HiSocket.Test/bin/Debug/HiSocket.Test.pdb differ diff --git a/src/HiSocket.Test/bin/Debug/HiSocket.dll b/src/HiSocket.Test/bin/Debug/HiSocket.dll index a11c971..58cf308 100644 Binary files a/src/HiSocket.Test/bin/Debug/HiSocket.dll and b/src/HiSocket.Test/bin/Debug/HiSocket.dll differ diff --git a/src/HiSocket.Test/bin/Debug/HiSocket.pdb b/src/HiSocket.Test/bin/Debug/HiSocket.pdb index 910c06d..2c3e1e3 100644 Binary files a/src/HiSocket.Test/bin/Debug/HiSocket.pdb and b/src/HiSocket.Test/bin/Debug/HiSocket.pdb differ diff --git a/src/HiSocket.Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/src/HiSocket.Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 606f364..854648a 100644 Binary files a/src/HiSocket.Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/src/HiSocket.Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/src/HiSocket.Test/obj/Debug/HiSocket.Test.csproj.CoreCompileInputs.cache b/src/HiSocket.Test/obj/Debug/HiSocket.Test.csproj.CoreCompileInputs.cache index 057cd0f..f0061db 100644 --- a/src/HiSocket.Test/obj/Debug/HiSocket.Test.csproj.CoreCompileInputs.cache +++ b/src/HiSocket.Test/obj/Debug/HiSocket.Test.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -cce52a4795e6d5db3dbd01a2cfaca65891eb473c +d2c55b9ca13d0ef5d02990a6d4e0e07c8e133469 diff --git a/src/HiSocket.Test/obj/Debug/HiSocket.Test.csproj.FileListAbsolute.txt b/src/HiSocket.Test/obj/Debug/HiSocket.Test.csproj.FileListAbsolute.txt index b6bb5f0..2e3f06e 100644 --- a/src/HiSocket.Test/obj/Debug/HiSocket.Test.csproj.FileListAbsolute.txt +++ b/src/HiSocket.Test/obj/Debug/HiSocket.Test.csproj.FileListAbsolute.txt @@ -36,3 +36,9 @@ D:\MyGit\github\HiSocket\src\HiSocket.Test\obj\Debug\HiSocket.Test.csproj.CoreCo D:\MyGit\github\HiSocket\src\HiSocket.Test\obj\Debug\HiSocket.Test.csproj.CopyComplete D:\MyGit\github\HiSocket\src\HiSocket.Test\obj\Debug\HiSocket.Test.dll D:\MyGit\github\HiSocket\src\HiSocket.Test\obj\Debug\HiSocket.Test.pdb +D:\MyGit\github\HiSocket\src\HiSocket.Test\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll +D:\MyGit\github\HiSocket\src\HiSocket.Test\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll +D:\MyGit\github\HiSocket\src\HiSocket.Test\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll +D:\MyGit\github\HiSocket\src\HiSocket.Test\bin\Debug\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll +D:\MyGit\github\HiSocket\src\HiSocket.Test\bin\Debug\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll +D:\MyGit\github\HiSocket\src\HiSocket.Test\bin\Debug\zh-Hans\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll diff --git a/src/HiSocket.Test/obj/Debug/HiSocket.Test.csprojAssemblyReference.cache b/src/HiSocket.Test/obj/Debug/HiSocket.Test.csprojAssemblyReference.cache index 5dc3ce0..37ee860 100644 Binary files a/src/HiSocket.Test/obj/Debug/HiSocket.Test.csprojAssemblyReference.cache and b/src/HiSocket.Test/obj/Debug/HiSocket.Test.csprojAssemblyReference.cache differ diff --git a/src/HiSocket.Test/obj/Debug/HiSocket.Test.dll b/src/HiSocket.Test/obj/Debug/HiSocket.Test.dll index b4793b9..88e23e0 100644 Binary files a/src/HiSocket.Test/obj/Debug/HiSocket.Test.dll and b/src/HiSocket.Test/obj/Debug/HiSocket.Test.dll differ diff --git a/src/HiSocket.Test/obj/Debug/HiSocket.Test.pdb b/src/HiSocket.Test/obj/Debug/HiSocket.Test.pdb index 69162f0..419aee9 100644 Binary files a/src/HiSocket.Test/obj/Debug/HiSocket.Test.pdb and b/src/HiSocket.Test/obj/Debug/HiSocket.Test.pdb differ diff --git a/src/HiSocket/HiSocket.csproj b/src/HiSocket/HiSocket.csproj index 7f07953..a5ec4dd 100644 --- a/src/HiSocket/HiSocket.csproj +++ b/src/HiSocket/HiSocket.csproj @@ -11,6 +11,7 @@ HiSocket v3.5 512 + Unity Subset v3.5 true diff --git a/src/HiSocket/TcpConnection/Socket/TcpSocket.cs b/src/HiSocket/TcpConnection/Socket/TcpSocket.cs index 98e43d9..ca6285f 100644 --- a/src/HiSocket/TcpConnection/Socket/TcpSocket.cs +++ b/src/HiSocket/TcpConnection/Socket/TcpSocket.cs @@ -209,7 +209,18 @@ private void EndSend(IAsyncResult ar) private void Receive() { - var count = ReceiveBuffer.HowManyCanWrite; + //var count = ReceiveBuffer.HowManyCanWrite;//可写下标不连续 + var count = 0; + if (ReceiveBuffer.EState == CircularBuffer.State.WriteAhead) + count = ReceiveBuffer.Size - ReceiveBuffer.WritePosition; + else if (ReceiveBuffer.EState == CircularBuffer.State.ReadAhead) + count = ReceiveBuffer.ReadPosition - ReceiveBuffer.WritePosition; + else if (ReceiveBuffer.EState == CircularBuffer.State.WriteEqualRead) + count = ReceiveBuffer.Size - ReceiveBuffer.WritePosition; + else + { + throw new Exception("state error"); + } try { Socket.BeginReceive(ReceiveBuffer.Array, ReceiveBuffer.WritePosition, count, SocketFlags.None, diff --git a/src/HiSocket/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/src/HiSocket/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 468fbcd..4e942d4 100644 Binary files a/src/HiSocket/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/src/HiSocket/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/src/HiSocket/obj/Debug/HiSocket.csproj.CoreCompileInputs.cache b/src/HiSocket/obj/Debug/HiSocket.csproj.CoreCompileInputs.cache index 48035a9..60421e4 100644 --- a/src/HiSocket/obj/Debug/HiSocket.csproj.CoreCompileInputs.cache +++ b/src/HiSocket/obj/Debug/HiSocket.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -aef6f356fafc0e0347fe76958283966412dbbff8 +e8480a323b2418b5cc5ee873db9a6c748952099e diff --git a/src/HiSocket/obj/Debug/HiSocket.csproj.FileListAbsolute.txt b/src/HiSocket/obj/Debug/HiSocket.csproj.FileListAbsolute.txt index 7b53220..89ad19d 100644 --- a/src/HiSocket/obj/Debug/HiSocket.csproj.FileListAbsolute.txt +++ b/src/HiSocket/obj/Debug/HiSocket.csproj.FileListAbsolute.txt @@ -7,7 +7,6 @@ D:\MyGit\github\HiSocket\visual\HiSocket\obj\Debug\HiSocket.dll D:\MyGit\github\HiSocket\visual\HiSocket\obj\Debug\HiSocket.pdb D:\MyGit\github\HiSocket\src\release\HiSocket.dll D:\MyGit\github\HiSocket\src\release\HiSocket.pdb -D:\MyGit\github\HiSocket\src\HiSocket\obj\Debug\HiSocket.csprojAssemblyReference.cache D:\MyGit\github\HiSocket\src\HiSocket\obj\Debug\HiSocket.csproj.CoreCompileInputs.cache D:\MyGit\github\HiSocket\src\HiSocket\obj\Debug\HiSocket.dll D:\MyGit\github\HiSocket\src\HiSocket\obj\Debug\HiSocket.pdb diff --git a/src/HiSocket/obj/Debug/HiSocket.dll b/src/HiSocket/obj/Debug/HiSocket.dll index a11c971..58cf308 100644 Binary files a/src/HiSocket/obj/Debug/HiSocket.dll and b/src/HiSocket/obj/Debug/HiSocket.dll differ diff --git a/src/HiSocket/obj/Debug/HiSocket.pdb b/src/HiSocket/obj/Debug/HiSocket.pdb index 910c06d..2c3e1e3 100644 Binary files a/src/HiSocket/obj/Debug/HiSocket.pdb and b/src/HiSocket/obj/Debug/HiSocket.pdb differ diff --git a/src/release/HiSocket.Message.dll b/src/release/HiSocket.Message.dll index 1cb96fc..be71266 100644 Binary files a/src/release/HiSocket.Message.dll and b/src/release/HiSocket.Message.dll differ diff --git a/src/release/HiSocket.Message.pdb b/src/release/HiSocket.Message.pdb index a40cd36..9aeb8c9 100644 Binary files a/src/release/HiSocket.Message.pdb and b/src/release/HiSocket.Message.pdb differ diff --git a/src/release/HiSocket.dll b/src/release/HiSocket.dll index a11c971..58cf308 100644 Binary files a/src/release/HiSocket.dll and b/src/release/HiSocket.dll differ diff --git a/src/release/HiSocket.pdb b/src/release/HiSocket.pdb index 910c06d..2c3e1e3 100644 Binary files a/src/release/HiSocket.pdb and b/src/release/HiSocket.pdb differ diff --git a/unity/Assets/HiSocket/HiSocket.Message.dll b/unity/Assets/HiSocket/HiSocket.Message.dll index 1cb96fc..be71266 100644 Binary files a/unity/Assets/HiSocket/HiSocket.Message.dll and b/unity/Assets/HiSocket/HiSocket.Message.dll differ diff --git a/unity/Assets/HiSocket/HiSocket.Message.pdb b/unity/Assets/HiSocket/HiSocket.Message.pdb index a40cd36..9aeb8c9 100644 Binary files a/unity/Assets/HiSocket/HiSocket.Message.pdb and b/unity/Assets/HiSocket/HiSocket.Message.pdb differ diff --git a/unity/Assets/HiSocket/HiSocket.dll b/unity/Assets/HiSocket/HiSocket.dll index a11c971..58cf308 100644 Binary files a/unity/Assets/HiSocket/HiSocket.dll and b/unity/Assets/HiSocket/HiSocket.dll differ diff --git a/unity/Assets/HiSocket/HiSocket.pdb b/unity/Assets/HiSocket/HiSocket.pdb index 910c06d..2c3e1e3 100644 Binary files a/unity/Assets/HiSocket/HiSocket.pdb and b/unity/Assets/HiSocket/HiSocket.pdb differ