From 2fcf9bc43df573d40e57de796a99cd070bf60cbb Mon Sep 17 00:00:00 2001 From: Jimmy Byrd Date: Wed, 2 Oct 2019 16:12:31 -0400 Subject: [PATCH] Bump version to 0.2.2 * MINOR: Adds ArrayPool for lower GC pressure. Netstandard2.1 only --- .paket/Paket.Restore.targets | 8 +- RELEASE_NOTES.md | 3 + ...sockets.TPL_AssemblyVersionInformation.htm | 2 +- .../FSharp.Control.Websockets.TPL_Stream.htm | 26 +- ...rol.Websockets.TPL_ThreadSafeWebSocket.htm | 175 ++++---- ...Sharp.Control.Websockets.TPL_WebSocket.htm | 125 +++--- ....Websockets_AssemblyVersionInformation.htm | 2 +- .../FSharp.Control.Websockets_Async.htm | 38 +- .../FSharp.Control.Websockets_Stream.htm | 26 +- ...ontrol.Websockets_ThreadSafeWebSocket2.htm | 350 +++++++-------- ...Control.Websockets_ThreadSafeWebsocket.htm | 404 ++++++++---------- .../FSharp.Control.Websockets_WebSocket.htm | 133 +++--- .../FSharp.Control.Websockets_Websocket2.htm | 26 +- docs/coverage/combined.js | 10 +- docs/coverage/index.htm | 28 +- .../AssemblyInfo.fs | 20 +- src/FSharp.Control.Websockets/AssemblyInfo.fs | 20 +- .../AssemblyInfo.fs | 20 +- .../AssemblyInfo.fs | 20 +- 19 files changed, 700 insertions(+), 736 deletions(-) diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index aed3c3f..952ad42 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -7,7 +7,7 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) $(MSBuildVersion) - 15.0.0 + 15.0.0 false true @@ -64,7 +64,7 @@ - + true true @@ -300,7 +300,7 @@ DevelopmentDependency="$(DevelopmentDependency)" BuildOutputInPackage="@(_BuildOutputInPackage)" TargetPathsToSymbols="@(_TargetPathsToSymbols)" - SymbolPackageFormat="symbols.nupkg" + SymbolPackageFormat="$(SymbolPackageFormat)" TargetFrameworks="@(_TargetFrameworks)" AssemblyName="$(AssemblyName)" PackageOutputPath="$(PackageOutputAbsolutePath)" @@ -347,7 +347,7 @@ DevelopmentDependency="$(DevelopmentDependency)" BuildOutputInPackage="@(_BuildOutputInPackage)" TargetPathsToSymbols="@(_TargetPathsToSymbols)" - SymbolPackageFormat="symbols.nupkg" + SymbolPackageFormat="$(SymbolPackageFormat)" TargetFrameworks="@(_TargetFrameworks)" AssemblyName="$(AssemblyName)" PackageOutputPath="$(PackageOutputAbsolutePath)" diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 339b56c..48e8459 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 0.2.2 - 2019-10-02 +* MINOR: Adds ArrayPool for lower GC pressure. Netstandard2.1 only + #### 0.2.1 - 2019-09-12 * MINOR: Replace Memorystream with RecyclableMemoryStream to help reduce Large Object Heap allocations (https://github.com/TheAngryByrd/FSharp.Control.WebSockets/pull/3) * MINOR: Adding Benchmarks (https://github.com/TheAngryByrd/FSharp.Control.WebSockets/pull/3) diff --git a/docs/coverage/FSharp.Control.Websockets.TPL_AssemblyVersionInformation.htm b/docs/coverage/FSharp.Control.Websockets.TPL_AssemblyVersionInformation.htm index 9de4872..b65963d 100644 --- a/docs/coverage/FSharp.Control.Websockets.TPL_AssemblyVersionInformation.htm +++ b/docs/coverage/FSharp.Control.Websockets.TPL_AssemblyVersionInformation.htm @@ -26,6 +26,6 @@

Summary

File(s)

No files found. This usually happens if a file isn't covered by a test or the class does not contain any sequence points (e.g. a class that only contains auto properties).

- + \ No newline at end of file diff --git a/docs/coverage/FSharp.Control.Websockets.TPL_Stream.htm b/docs/coverage/FSharp.Control.Websockets.TPL_Stream.htm index ab8179a..f258af1 100644 --- a/docs/coverage/FSharp.Control.Websockets.TPL_Stream.htm +++ b/docs/coverage/FSharp.Control.Websockets.TPL_Stream.htm @@ -236,10 +236,10 @@

 196    ///  197    let sendMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (cancellationToken : Ca  198        let buffer =199            #if NETSTANDARD2_1200            arrayPool.Rent(bufferSize)199            #if NETSTANDARD2_0 || NET461200            Array.create (bufferSize) Byte.MinValue  201            #else202            Array.create (bufferSize) Byte.MinValue202            arrayPool.Rent(bufferSize)  203            #endif  204        let mutable moreToRead = true  205        try @@ -251,10 +251,10 @@

 211                    moreToRead <- false  212                    do! send socket (ArraySegment(Array.empty)) messageType true cancellationToken  213        finally214            #if NETSTANDARD2_1215            arrayPool.Return(buffer,true)214            #if NETSTANDARD2_0 || NET461215            ()  216            #else217            ()217            arrayPool.Return(buffer,true)  218            #endif  219        }  220 @@ -306,10 +306,10 @@

 266    ///  267    let receiveMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (cancellationToken :  268        let innerbuffer =269            #if NETSTANDARD2_1270            arrayPool.Rent(bufferSize)269            #if NETSTANDARD2_0 || NET461270            Array.create (bufferSize) Byte.MinValue  271            #else272            Array.create (bufferSize) Byte.MinValue272            arrayPool.Rent(bufferSize)  273            #endif  274        let buffer = new ArraySegment<Byte>(innerbuffer)  275        let mutable moreToRead = true @@ -331,10 +331,10 @@

 291                        mainResult <- Stream writeableStream  292            return mainResult  293        finally294            #if NETSTANDARD2_1295            arrayPool.Return(innerbuffer,true)294            #if NETSTANDARD2_0 || NET461295            ()  296            #else297            ()297            arrayPool.Return(innerbuffer,true)  298            #endif  299  300    } @@ -608,7 +608,7 @@

 568 - +

Methods/Properties

diff --git a/docs/coverage/FSharp.Control.Websockets.TPL_ThreadSafeWebSocket.htm b/docs/coverage/FSharp.Control.Websockets.TPL_ThreadSafeWebSocket.htm index 31444e3..0adec1d 100644 --- a/docs/coverage/FSharp.Control.Websockets.TPL_ThreadSafeWebSocket.htm +++ b/docs/coverage/FSharp.Control.Websockets.TPL_ThreadSafeWebSocket.htm @@ -17,12 +17,11 @@

Summary

Class:FSharp.Control.Websockets.TPL.ThreadSafeWebSocket Assembly:FSharp.Control.Websockets.TPL File(s):/Users/jimmybyrd/Documents/GitHub/FSharp.Control.Websockets/src/FSharp.Control.Websockets.TPL/FSharp.Control.Websockets.TPL.fs -Covered lines:49 -Uncovered lines:12 -Coverable lines:61 +Covered lines:46 +Uncovered lines:3 +Coverable lines:49 Total lines:568 -Line coverage:80.3% -Branch coverage:75% +Line coverage:93.8%

Metrics

@@ -37,55 +36,46 @@

Metrics

close(...)1010001 closeOutput(...)1010001 System-IDisposable-Dispose()1010001 -Invoke(...)10000 -Invoke(...)10000 -Invoke(...)10000 -Invoke(...)10000 -Invoke(...)10000 -Invoke(...)1010001 -Invoke(...)1010001 Invoke(...)1010001 -Invoke(...)10000 Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)10000 +Invoke(...)10000 +Invoke(...)1010001 +Invoke(...)1010001 Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 +Invoke(...)1010001 +Invoke(...)10000 +Invoke(...)1010001 +Invoke(...)1010001 +Invoke(...)1010001 +Invoke(...)1010001 +Invoke(...)10000 +Invoke(...)1010001 Invoke(...)1010001 -Invoke(...)10000 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)341001003 +Invoke(...)3010003 Invoke(...)1010001 Invoke(...)1010001 Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)10000 +Invoke(...)1010001 Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 +Invoke(...)10000 +Invoke(...)1010001 +Invoke(...)1010001 +Invoke(...)1010001 Invoke(...)1010001 Invoke(...)1010001 -Invoke(...)1010001 +Invoke(...)1010001 Invoke(...)1010001 -Invoke(...)1010001 +Invoke(...)1010001 Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)3442.86604.68 -Invoke(...)1010001 +Invoke(...)1010001 +Invoke(...)1010001 +Invoke(...)3010003 +Invoke(...)1010001 Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 +Invoke(...)1010001 +Invoke(...)1010001 +Invoke(...)1010001 +Invoke(...)1010001

File(s)

@@ -291,10 +281,10 @@

 196    ///  197    let sendMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (cancellationToken : Ca  198        let buffer =199            #if NETSTANDARD2_1200            arrayPool.Rent(bufferSize)199            #if NETSTANDARD2_0 || NET461200            Array.create (bufferSize) Byte.MinValue  201            #else202            Array.create (bufferSize) Byte.MinValue202            arrayPool.Rent(bufferSize)  203            #endif  204        let mutable moreToRead = true  205        try @@ -306,10 +296,10 @@

 211                    moreToRead <- false  212                    do! send socket (ArraySegment(Array.empty)) messageType true cancellationToken  213        finally214            #if NETSTANDARD2_1215            arrayPool.Return(buffer,true)214            #if NETSTANDARD2_0 || NET461215            ()  216            #else217            ()217            arrayPool.Return(buffer,true)  218            #endif  219        }  220 @@ -361,10 +351,10 @@

 266    ///  267    let receiveMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (cancellationToken :  268        let innerbuffer =269            #if NETSTANDARD2_1270            arrayPool.Rent(bufferSize)269            #if NETSTANDARD2_0 || NET461270            Array.create (bufferSize) Byte.MinValue  271            #else272            Array.create (bufferSize) Byte.MinValue272            arrayPool.Rent(bufferSize)  273            #endif  274        let buffer = new ArraySegment<Byte>(innerbuffer)  275        let mutable moreToRead = true @@ -386,10 +376,10 @@

 291                        mainResult <- Stream writeableStream  292            return mainResult  293        finally294            #if NETSTANDARD2_1295            arrayPool.Return(innerbuffer,true)294            #if NETSTANDARD2_0 || NET461295            ()  296            #else297            ()297            arrayPool.Return(innerbuffer,true)  298            #endif  299  300    } @@ -458,7 +448,7 @@

 6363                x.websocket.Dispose()  364        /// Returns the current state of the WebSocket connection.  365        member x.State = - 12366            x.websocket.State + 0366            x.websocket.State  367        /// Indicates the reason why the remote endpoint initiated the close handshake.  368        member x.CloseStatus =  0369            x.websocket.CloseStatus |> Option.ofNullable @@ -485,36 +475,36 @@

 6390        let receiveBuffer = BufferBlock<ReceiveMessage>(dataflowBlockOptions)  391  392        /// handle executing a task in a try/catch and wrapping up the callstack info for later - 0393        let inline wrap (action: unit -> Task<_>) (reply: TaskCompletionSource<_>) = task { - 0394            try - 0395                let! result = action () - 0396                reply.SetResult (Ok result) - 0397            with - 0398            | ex -> - 0399                let dispatch = ExceptionDispatchInfo.Capture ex - 0400                reply.SetResult(Error dispatch)393        let inline wrap (action: unit -> Task<_>) (reply: TaskCompletionSource<_>) = task {394            try395                let! result = action ()396                reply.SetResult (Ok result)397            with398            | ex ->399                let dispatch = ExceptionDispatchInfo.Capture ex400                reply.SetResult(Error dispatch)  401        }  402  403        let sendLoop  = task {  6404            let mutable hasClosedBeenSent = false  405  6406            while webSocket |> WebSocket.isWebsocketOpen && not hasClosedBeenSent do - 24407                let! message = sendBuffer.ReceiveAsync() - 18408                match message with + 12407                let! message = sendBuffer.ReceiveAsync()408                match message with  409                | Send (cancellationToken, buffer, messageType, stream, replyChannel) -> - 36410                    do! wrap (fun () -> WebSocket.sendMessage webSocket  buffer messageType cancellationToken stream ) r + 30410                    do! wrap (fun () -> WebSocket.sendMessage webSocket  buffer messageType cancellationToken stream ) r  411                | Close (cancellationToken, status, message, replyChannel) ->  3412                    hasClosedBeenSent <- true - 18413                    do! wrap (fun ( ) -> WebSocket.close webSocket status message cancellationToken ) replyChannel + 15413                    do! wrap (fun ( ) -> WebSocket.close webSocket status message cancellationToken ) replyChannel  414                | CloseOutput (cancellationToken, status, message, replyChannel) ->  3415                    hasClosedBeenSent <- true - 18416                    do! wrap (fun () -> WebSocket.closeOutput webSocket status message cancellationToken ) replyChannel + 15416                    do! wrap (fun () -> WebSocket.closeOutput webSocket status message cancellationToken ) replyChannel  417        }  418  419        let receiveLoop = task {  18420            while webSocket |> WebSocket.isWebsocketOpen do - 18421                let! (cancellationToken, buffer, messageType, stream, replyChannel) = receiveBuffer.ReceiveAsync() - 36422                do! wrap (fun () -> WebSocket.receiveMessage webSocket buffer messageType cancellationToken stream ) rep + 12421                let! (cancellationToken, buffer, messageType, stream, replyChannel) = receiveBuffer.ReceiveAsync() + 30422                do! wrap (fun () -> WebSocket.receiveMessage webSocket buffer messageType cancellationToken stream ) rep  423        }  424  18425        { @@ -543,7 +533,7 @@

 6448    let sendMessage (threadSafeWebSocket : ThreadSafeWebSocket)  (bufferSize : int) (messageType : WebSocketMessageType)  6449        let reply = new TaskCompletionSource<_>()  6450        let msg = Send(cancellationToken,bufferSize, messageType, readableStream, reply) - 12451        let! accepted = threadSafeWebSocket.sendChannel.SendAsync msg + 6451        let! accepted = threadSafeWebSocket.sendChannel.SendAsync msg  6452        return! reply.Task  453    }  454 @@ -563,7 +553,7 @@

 468    /// **Exceptions**  469    ///  6470    let sendMessageAsUTF8 (threadSafeWebSocket : ThreadSafeWebSocket) (cancellationToken : CancellationToken) (text : st - 12471        use stream = IO.MemoryStream.UTF8toMemoryStream text + 6471        use stream = IO.MemoryStream.UTF8toMemoryStream text  6472        return! sendMessage threadSafeWebSocket  WebSocket.DefaultBufferSize WebSocketMessageType.Text cancellationToken  473    }  474 @@ -587,7 +577,7 @@

 6492    let receiveMessage (threadSafeWebSocket : ThreadSafeWebSocket)  (bufferSize : int) (messageType : WebSocketMessageTy  6493        let reply = new TaskCompletionSource<_>()  6494        let msg = (cancellationToken, bufferSize, messageType, writeableStream, reply) - 12495        let! accepted = threadSafeWebSocket.receiveChannel.SendAsync(msg) + 6495        let! accepted = threadSafeWebSocket.receiveChannel.SendAsync(msg)  6496        return! reply.Task  497    }  498 @@ -606,12 +596,12 @@

 511    /// **Exceptions**  512    ///  6513    let receiveMessageAsUTF8 (threadSafeWebSocket : ThreadSafeWebSocket) (cancellationToken : CancellationToken) = task  - 12514        use stream =  recyclableMemoryStreamManager.GetStream() - 12515        let! response = receiveMessage threadSafeWebSocket  WebSocket.DefaultBufferSize WebSocketMessageType.Text cancel - 6516        match response with + 6514        use stream =  recyclableMemoryStreamManager.GetStream() + 6515        let! response = receiveMessage threadSafeWebSocket  WebSocket.DefaultBufferSize WebSocketMessageType.Text cancel516        match response with  6517        | Ok (WebSocket.ReceiveStreamResult.Stream s) -> return stream |> IO.MemoryStream.ToUTF8String |> WebSocket.Rece - 0518        | Ok (WebSocket.ReceiveStreamResult.Closed(status, reason)) -> return WebSocket.ReceiveUTF8Result.Closed(status, - 0519        | Error ex -> return Error ex518        | Ok (WebSocket.ReceiveStreamResult.Closed(status, reason)) -> return WebSocket.ReceiveUTF8Result.Closed(status,519        | Error ex -> return Error ex  520  521    }  522 @@ -634,7 +624,7 @@

 3539    let close (threadSafeWebSocket : ThreadSafeWebSocket)  (closeStatus : WebSocketCloseStatus) (statusDescription : str  3540        let reply = new TaskCompletionSource<_>()  3541        let msg = Close(cancellationToken,closeStatus, statusDescription, reply) - 6542        let! accepted = threadSafeWebSocket.sendChannel.SendAsync msg + 3542        let! accepted = threadSafeWebSocket.sendChannel.SendAsync msg  3543        return! reply.Task  544    }  545 @@ -657,13 +647,13 @@

 3562    let closeOutput (threadSafeWebSocket : ThreadSafeWebSocket) (closeStatus : WebSocketCloseStatus) (statusDescription   3563        let reply = new TaskCompletionSource<_>()  3564        let msg = CloseOutput(cancellationToken,closeStatus, statusDescription, reply) - 6565        let! accepted = threadSafeWebSocket.sendChannel.SendAsync msg + 3565        let! accepted = threadSafeWebSocket.sendChannel.SendAsync msg  3566        return! reply.Task  567    }  568 -

+

Methods/Properties

@@ -672,45 +662,40 @@

Methods/Properties

CloseStatus()
CloseStatusDescription()
createFromWebSocket(System.Threading.Tasks.Dataflow.DataflowBlockOptions,System.Net.WebSockets.WebSocket)
-Invoke(Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit,System.Threading.Tasks.Task`1<a>>,System.Threading.Tasks.TaskCompletionSource`1<Microsoft.FSharp.Core.FSharpResult`2<a,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
-Invoke(System.Exception)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(a)
-Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(FSharp.Control.Websockets.TPL.ThreadSafeWebSocket/SendMessages)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(System.Exception)
+Invoke(FSharp.Control.Websockets.TPL.ThreadSafeWebSocket/SendMessages)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(System.Exception)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(System.Exception)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(System.Tuple`5<System.Threading.CancellationToken,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,System.Threading.Tasks.TaskCompletionSource`1<Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.TPL.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>>)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.Unit)
Invoke(FSharp.Control.Websockets.TPL.WebSocket/ReceiveStreamResult)
+Invoke(Microsoft.FSharp.Core.Unit)
Invoke(System.Exception)
+Invoke(System.Tuple`5<System.Threading.CancellationToken,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,System.Threading.Tasks.TaskCompletionSource`1<Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.TPL.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>>)
sendMessage(FSharp.Control.Websockets.TPL.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.Threading.CancellationToken,a)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(System.Boolean)
+Invoke(System.Boolean)
sendMessageAsUTF8(FSharp.Control.Websockets.TPL.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Threading.CancellationToken,System.String)
-Invoke(System.IO.MemoryStream)
Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(System.IO.MemoryStream)
receiveMessage(FSharp.Control.Websockets.TPL.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.Threading.CancellationToken,System.IO.Stream)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(System.Boolean)
+Invoke(System.Boolean)
receiveMessageAsUTF8(FSharp.Control.Websockets.TPL.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Threading.CancellationToken)
-Invoke(System.IO.MemoryStream)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.TPL.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>)
+Invoke(System.IO.MemoryStream)
+Invoke(Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.TPL.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>)
close(FSharp.Control.Websockets.TPL.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Net.WebSockets.WebSocketCloseStatus,System.String,System.Threading.CancellationToken)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(System.Boolean)
+Invoke(System.Boolean)
closeOutput(FSharp.Control.Websockets.TPL.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Net.WebSockets.WebSocketCloseStatus,System.String,System.Threading.CancellationToken)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(System.Boolean)
+Invoke(System.Boolean)

diff --git a/docs/coverage/FSharp.Control.Websockets.TPL_WebSocket.htm b/docs/coverage/FSharp.Control.Websockets.TPL_WebSocket.htm index c443314..a2aa863 100644 --- a/docs/coverage/FSharp.Control.Websockets.TPL_WebSocket.htm +++ b/docs/coverage/FSharp.Control.Websockets.TPL_WebSocket.htm @@ -17,20 +17,20 @@

Summary

Class:FSharp.Control.Websockets.TPL.WebSocket Assembly:FSharp.Control.Websockets.TPL File(s):/Users/jimmybyrd/Documents/GitHub/FSharp.Control.Websockets/src/FSharp.Control.Websockets.TPL/FSharp.Control.Websockets.TPL.fs -Covered lines:57 -Uncovered lines:1 -Coverable lines:58 +Covered lines:47 +Uncovered lines:3 +Coverable lines:50 Total lines:568 -Line coverage:98.2% -Branch coverage:90% +Line coverage:94% +Branch coverage:62.5%

Metrics

- - + + @@ -39,43 +39,38 @@

Metrics

- - - + - - + - + - + - - - - - - - - + + + + + + - + - + - - + + - - + +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage Crap Score
isWebsocketOpen(...)1010001
receive(...)1010001
isWebsocketOpen(...)10000
receive(...)10000
send(...)1010001
close(...)1010001
closeOutput(...)1010001
receiveMessage(...)1010001
receiveMessageAsUTF8(...)1010001
Invoke(...)10000
Invoke(...)10000
Invoke(...)2010002
Invoke(...)10000
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)2010002
Invoke(...)10000
Invoke(...)10000
Invoke(...)2010002
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)221001002
Invoke(...)221001002
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)221001002
Invoke(...)10000
Invoke(...)2010002
Invoke(...)6487.5806.07
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)2010002
Invoke(...)688057.146.29
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)221001002
Invoke(...)1010001
Invoke(...)2010002
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001

File(s)

@@ -180,7 +175,7 @@

 95    /// **Exceptions**  96    ///  97    let isWebsocketOpen (socket : #WebSocket) = - 5498        socket.State = WebSocketState.Open + 098        socket.State = WebSocketState.Open  99  100  101 @@ -199,7 +194,7 @@

 114    /// **Exceptions**  115    ///  116    let receive (websocket : WebSocket) (buffer : ArraySegment<byte>) (cancellationToken : CancellationToken) = - 30117        websocket.ReceiveAsync(buffer, cancellationToken) + 0117        websocket.ReceiveAsync(buffer, cancellationToken)  118  119  120 @@ -281,25 +276,25 @@

 196    ///  12197    let sendMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (cancellationToken : Ca  12198        let buffer = - 12199            #if NETSTANDARD2_1 - 12200            arrayPool.Rent(bufferSize) - 8201            #else - 8202            Array.create (bufferSize) Byte.MinValue + 12199            #if NETSTANDARD2_0 || NET461 + 12200            Array.create (bufferSize) Byte.MinValue + 4201            #else + 4202            arrayPool.Rent(bufferSize)  203            #endif  12204        let mutable moreToRead = true  12205        try  12206            while moreToRead && isWebsocketOpen socket do - 48207                let! read = readableStream.ReadAsync(buffer, 0, buffer.Length) + 24207                let! read = readableStream.ReadAsync(buffer, 0, buffer.Length)  24208                if read > 0 then  24209                    do!  send socket (ArraySegment(buffer |> Array.take read)) messageType false cancellationToken  210                else  12211                    moreToRead <- false  24212                    do! send socket (ArraySegment(Array.empty)) messageType true cancellationToken  213        finally214            #if NETSTANDARD2_1 - 4215            arrayPool.Return(buffer,true)214            #if NETSTANDARD2_0 || NET461 + 8215            ()  216            #else - 8217            () + 4217            arrayPool.Return(buffer,true)  218            #endif  219        }  220 @@ -319,7 +314,7 @@

 234    /// **Exceptions**  235    ///  6236    let sendMessageAsUTF8 (socket : WebSocket) (cancellationToken : CancellationToken) (text : string) = task { - 12237        use stream = IO.MemoryStream.UTF8toMemoryStream text + 6237        use stream = IO.MemoryStream.UTF8toMemoryStream text  12238        do! sendMessage socket DefaultBufferSize  WebSocketMessageType.Text cancellationToken stream  239    }  240 @@ -351,35 +346,35 @@

 266    ///  18267    let receiveMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (cancellationToken :  18268        let innerbuffer = - 18269            #if NETSTANDARD2_1 - 18270            arrayPool.Rent(bufferSize) - 12271            #else - 12272            Array.create (bufferSize) Byte.MinValue + 18269            #if NETSTANDARD2_0 || NET461 + 18270            Array.create (bufferSize) Byte.MinValue + 6271            #else + 6272            arrayPool.Rent(bufferSize)  273            #endif  18274        let buffer = new ArraySegment<Byte>(innerbuffer)  18275        let mutable moreToRead = true  18276        let mutable mainResult = Unchecked.defaultof<ReceiveStreamResult>  18277        try  66278            while moreToRead do - 60279                let! result  = receive socket buffer cancellationToken - 54280                match result with + 30279                let! result  = receive socket buffer cancellationToken280                match result with  281                | result when result.MessageType = WebSocketMessageType.Close || socket.State = WebSocketState.CloseRece - 12282                    do! socket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "Close received", cancellationToken) - 6283                    moreToRead <- false - 6284                    mainResult <- Closed(socket.CloseStatus.Value, socket.CloseStatusDescription) + 6282                    do! socket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "Close received", cancellationToken)283                    moreToRead <- false284                    mainResult <- Closed(socket.CloseStatus.Value, socket.CloseStatusDescription)  285                | result ->  72286                    if result.MessageType <> messageType then  0287                        failwithf "Invalid message type received %A, expected %A" result.MessageType messageType - 48288                    do! writeableStream.WriteAsync(buffer.Array, 0, result.Count) - 36289                    if result.EndOfMessage then - 12290                        moreToRead <- false - 12291                        mainResult <- Stream writeableStream + 24288                    do! writeableStream.WriteAsync(buffer.Array, 0, result.Count)289                    if result.EndOfMessage then290                        moreToRead <- false291                        mainResult <- Stream writeableStream  18292            return mainResult  293        finally294            #if NETSTANDARD2_1 - 6295            arrayPool.Return(innerbuffer,true)294            #if NETSTANDARD2_0 || NET461 + 12295            ()  296            #else - 12297            () + 6297            arrayPool.Return(innerbuffer,true)  298            #endif  299  300    } @@ -408,13 +403,13 @@

 323    /// **Exceptions**  324    ///  12325    let receiveMessageAsUTF8 (socket : WebSocket) (cancellationToken : CancellationToken)  = task { - 24326        use stream =  recyclableMemoryStreamManager.GetStream() - 24327        let! result = receiveMessage socket  DefaultBufferSize WebSocketMessageType.Text cancellationToken stream - 18328        match result with + 12326        use stream =  recyclableMemoryStreamManager.GetStream() + 12327        let! result = receiveMessage socket  DefaultBufferSize WebSocketMessageType.Text cancellationToken stream328        match result with  329        | ReceiveStreamResult.Stream s ->  6330            return stream |> IO.MemoryStream.ToUTF8String |> String  331        | ReceiveStreamResult.Closed(status, reason) -> - 6332            return ReceiveUTF8Result.Closed(status, reason)332            return ReceiveUTF8Result.Closed(status, reason)  333    }  334  335 @@ -653,7 +648,7 @@

 568 - +

Methods/Properties

@@ -668,31 +663,31 @@

Methods/Properties

sendMessage(System.Net.WebSockets.WebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.Threading.CancellationToken,a)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(System.Int32)
Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(System.Int32)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
sendMessageAsUTF8(System.Net.WebSockets.WebSocket,System.Threading.CancellationToken,System.String)
-Invoke(System.IO.MemoryStream)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(System.IO.MemoryStream)
receiveMessage(System.Net.WebSockets.WebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.Threading.CancellationToken,System.IO.Stream)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(System.Net.WebSockets.WebSocketReceiveResult)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(System.Net.WebSockets.WebSocketReceiveResult)
Invoke(System.Net.WebSockets.WebSocketMessageType)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
receiveMessageAsUTF8(System.Net.WebSockets.WebSocket,System.Threading.CancellationToken)
-Invoke(System.IO.MemoryStream)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(FSharp.Control.Websockets.TPL.WebSocket/ReceiveStreamResult)
+Invoke(System.IO.MemoryStream)
+Invoke(FSharp.Control.Websockets.TPL.WebSocket/ReceiveStreamResult)

diff --git a/docs/coverage/FSharp.Control.Websockets_AssemblyVersionInformation.htm b/docs/coverage/FSharp.Control.Websockets_AssemblyVersionInformation.htm index 3c285b1..735faf4 100644 --- a/docs/coverage/FSharp.Control.Websockets_AssemblyVersionInformation.htm +++ b/docs/coverage/FSharp.Control.Websockets_AssemblyVersionInformation.htm @@ -26,6 +26,6 @@

Summary

File(s)

No files found. This usually happens if a file isn't covered by a test or the class does not contain any sequence points (e.g. a class that only contains auto properties).

- + \ No newline at end of file diff --git a/docs/coverage/FSharp.Control.Websockets_Async.htm b/docs/coverage/FSharp.Control.Websockets_Async.htm index 4b742bf..9493227 100644 --- a/docs/coverage/FSharp.Control.Websockets_Async.htm +++ b/docs/coverage/FSharp.Control.Websockets_Async.htm @@ -30,10 +30,8 @@

Metrics

AwaitTaskWithCancellation(...)1010001 AwaitTaskWithCancellation(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 -Invoke(...)1010001 +Invoke(...)1010001 +Invoke(...)1010001 AwaitTaskWithCancellation(...)10000 AwaitTaskWithCancellation(...)10000 Invoke(...)10000 @@ -68,7 +66,7 @@

 19    /// **Exceptions**  20    ///  21    static member AwaitTaskWithCancellation (f: CancellationToken -> Task) : Async<unit> = - 10822        async.Bind(Async.CancellationToken, f >> Async.AwaitTask) + 7222        async.Bind(Async.CancellationToken, f >> Async.AwaitTask)  23  24    /// **Description**  25    /// @@ -83,7 +81,7 @@

 34    /// **Exceptions**  35    ///  36    static member AwaitTaskWithCancellation (f: CancellationToken -> Task<'a>) : Async<'a> = - 9037        async.Bind(Async.CancellationToken, f >> Async.AwaitTask) + 6037        async.Bind(Async.CancellationToken, f >> Async.AwaitTask)  38  39module Stream =  40    open System @@ -275,10 +273,10 @@

 226    ///  227    let sendMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (readableStream : #IO.S  228        let buffer =229            #if NETSTANDARD2_1230            arrayPool.Rent(bufferSize)229            #if NETSTANDARD2_0 || NET461230            Array.create (bufferSize) Byte.MinValue  231            #else232            Array.create (bufferSize) Byte.MinValue232            arrayPool.Rent(bufferSize)  233            #endif  234  235        let rec sendMessage' () = async { @@ -293,10 +291,10 @@

 244        try  245            return! sendMessage'()  246        finally247            #if NETSTANDARD2_1248            arrayPool.Return(buffer,true)247            #if NETSTANDARD2_0 || NET461248            ()  249            #else250            ()250            arrayPool.Return(buffer,true)  251            #endif  252    }  253 @@ -345,10 +343,10 @@

 296    ///  297    let receiveMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (writeableStream : I  298        let innerbuffer =299            #if NETSTANDARD2_1300            arrayPool.Rent(bufferSize)299            #if NETSTANDARD2_0 || NET461300            Array.create (bufferSize) Byte.MinValue  301            #else302            Array.create (bufferSize) Byte.MinValue302            arrayPool.Rent(bufferSize)  303            #endif  304        let buffer = new ArraySegment<Byte>(innerbuffer)  305 @@ -371,10 +369,10 @@

 322        try  323            return! readTillEnd' ()  324        finally325            #if NETSTANDARD2_1326            arrayPool.Return(innerbuffer,true)325            #if NETSTANDARD2_0 || NET461326            ()  327            #else328            ()328            arrayPool.Return(innerbuffer,true)  329            #endif  330  331    } @@ -621,7 +619,7 @@

 572        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> CloseOutput(closeStatus, statusDescription, reply - + diff --git a/docs/coverage/FSharp.Control.Websockets_Stream.htm b/docs/coverage/FSharp.Control.Websockets_Stream.htm index 8de3589..3f812f9 100644 --- a/docs/coverage/FSharp.Control.Websockets_Stream.htm +++ b/docs/coverage/FSharp.Control.Websockets_Stream.htm @@ -269,10 +269,10 @@

 226    ///  227    let sendMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (readableStream : #IO.S  228        let buffer =229            #if NETSTANDARD2_1230            arrayPool.Rent(bufferSize)229            #if NETSTANDARD2_0 || NET461230            Array.create (bufferSize) Byte.MinValue  231            #else232            Array.create (bufferSize) Byte.MinValue232            arrayPool.Rent(bufferSize)  233            #endif  234  235        let rec sendMessage' () = async { @@ -287,10 +287,10 @@

 244        try  245            return! sendMessage'()  246        finally247            #if NETSTANDARD2_1248            arrayPool.Return(buffer,true)247            #if NETSTANDARD2_0 || NET461248            ()  249            #else250            ()250            arrayPool.Return(buffer,true)  251            #endif  252    }  253 @@ -339,10 +339,10 @@

 296    ///  297    let receiveMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (writeableStream : I  298        let innerbuffer =299            #if NETSTANDARD2_1300            arrayPool.Rent(bufferSize)299            #if NETSTANDARD2_0 || NET461300            Array.create (bufferSize) Byte.MinValue  301            #else302            Array.create (bufferSize) Byte.MinValue302            arrayPool.Rent(bufferSize)  303            #endif  304        let buffer = new ArraySegment<Byte>(innerbuffer)  305 @@ -365,10 +365,10 @@

 322        try  323            return! readTillEnd' ()  324        finally325            #if NETSTANDARD2_1326            arrayPool.Return(innerbuffer,true)325            #if NETSTANDARD2_0 || NET461326            ()  327            #else328            ()328            arrayPool.Return(innerbuffer,true)  329            #endif  330  331    } @@ -615,7 +615,7 @@

 572        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> CloseOutput(closeStatus, statusDescription, reply - +

Methods/Properties

diff --git a/docs/coverage/FSharp.Control.Websockets_ThreadSafeWebSocket2.htm b/docs/coverage/FSharp.Control.Websockets_ThreadSafeWebSocket2.htm index 968c62d..88061c1 100644 --- a/docs/coverage/FSharp.Control.Websockets_ThreadSafeWebSocket2.htm +++ b/docs/coverage/FSharp.Control.Websockets_ThreadSafeWebSocket2.htm @@ -4,7 +4,7 @@ -FSharp.Control.Websockets.ThreadSafeWebsocket - Coverage Report +FSharp.Control.Websockets.ThreadSafeWebSocket - Coverage Report

Summary

@@ -14,52 +14,58 @@

Summary

-Class:FSharp.Control.Websockets.ThreadSafeWebsocket +Class:FSharp.Control.Websockets.ThreadSafeWebSocket Assembly:FSharp.Control.Websockets File(s):/Users/jimmybyrd/Documents/GitHub/FSharp.Control.Websockets/src/FSharp.Control.Websockets/FSharp.Control.Websockets.fs -Covered lines:0 -Uncovered lines:49 -Coverable lines:49 +Covered lines:31 +Uncovered lines:5 +Coverable lines:36 Total lines:572 -Line coverage:0% -Branch coverage:0% +Line coverage:86.1% +Branch coverage:80%

Metrics

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage Crap Score
createFromWebSocket(...)10000
sendMessage(...)10000
sendMessageAsUTF8(...)10000
receiveMessage(...)10000
receiveMessageAsUTF8(...)10000
close(...)10000
closeOutput(...)10000
System-IDisposable-Dispose()10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)48000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)22000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
loop@440-1(...)1010001
loop@425(...)1010001
createFromWebSocket(...)1010001
sendMessage(...)1010001
sendMessageAsUTF8(...)1010001
receiveMessage(...)1010001
receiveMessageAsUTF8(...)1010001
close(...)1010001
closeOutput(...)1010001
System-IDisposable-Dispose()1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)4685.7185.714.05
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)2266.6766.672.15
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)3233.331005.67
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001

File(s)

@@ -198,72 +204,72 @@

 129    /// **Exceptions**  130    ///  131    let isWebsocketOpen (socket : WebSocket) = - 0132        socket.State = WebSocketState.Open132        socket.State = WebSocketState.Open  133 - 0134    /// **Description**134    /// **Description**  135    /// - 0136    /// Receives data from the `System.Net.WebSockets.WebSocket` connection asynchronously.136    /// Receives data from the `System.Net.WebSockets.WebSocket` connection asynchronously.  137    /// - 0138    /// **Parameters**138    /// **Parameters**  139    ///   * `websocket` - parameter of type `WebSocket`  140    ///   * `buffer` - parameter of type `ArraySegment<byte>` - References the application buffer that is the storage lo - 0141    /// - 0142    /// **Output Type** - 0143    ///   * `Async<WebSocketReceiveResult>` - An instance of this class represents the result of performing a single Rec - 0144    /// - 0145    /// **Exceptions** - 0146    /// - 0147    let asyncReceive (websocket : WebSocket) (buffer : ArraySegment<byte>)  = - 0148        fun ct ->  websocket.ReceiveAsync(buffer,ct) - 0149        |> Async.AwaitTaskWithCancellation - 0150 - 0151 - 0152    /// **Description** - 0153    /// - 0154    /// Sends data over the `System.Net.WebSockets.WebSocket` connection asynchronously. - 0155    /// - 0156    /// **Parameters** - 0157    ///   * `websocket` - parameter of type `WebSocket` - 0158    ///   * `buffer` - parameter of type `ArraySegment<byte>` - The buffer to be sent over the connection. - 0159    ///   * `messageType` - parameter of type `WebSocketMessageType`- Indicates whether the application is sending a bin - 0160    ///   * `endOfMessage` - parameter of type `bool` - Indicates whether the data in `buffer` is the last part of a mes - 0161    /// - 0162    /// **Output Type** - 0163    ///   * `Async<unit>` - 0164    /// - 0165    /// **Exceptions** - 0166    /// - 0167    let asyncSend (websocket : WebSocket) (buffer : ArraySegment<byte>) (messageType : WebSocketMessageType) (endOfMessa - 0168        fun ct ->  websocket.SendAsync(buffer, messageType, endOfMessage, ct) - 0169        |> Async.AwaitTaskWithCancellation - 0170 - 0171 - 0172    /// **Description** - 0173    /// - 0174    /// Closes the WebSocket connection as an asynchronous operation using the close handshake defined in the http://too141    ///142    /// **Output Type**143    ///   * `Async<WebSocketReceiveResult>` - An instance of this class represents the result of performing a single Rec144    ///145    /// **Exceptions**146    ///147    let asyncReceive (websocket : WebSocket) (buffer : ArraySegment<byte>)  =148        fun ct ->  websocket.ReceiveAsync(buffer,ct)149        |> Async.AwaitTaskWithCancellation150151152    /// **Description**153    ///154    /// Sends data over the `System.Net.WebSockets.WebSocket` connection asynchronously.155    ///156    /// **Parameters**157    ///   * `websocket` - parameter of type `WebSocket`158    ///   * `buffer` - parameter of type `ArraySegment<byte>` - The buffer to be sent over the connection.159    ///   * `messageType` - parameter of type `WebSocketMessageType`- Indicates whether the application is sending a bin160    ///   * `endOfMessage` - parameter of type `bool` - Indicates whether the data in `buffer` is the last part of a mes161    ///162    /// **Output Type**163    ///   * `Async<unit>`164    ///165    /// **Exceptions**166    ///167    let asyncSend (websocket : WebSocket) (buffer : ArraySegment<byte>) (messageType : WebSocketMessageType) (endOfMessa168        fun ct ->  websocket.SendAsync(buffer, messageType, endOfMessage, ct)169        |> Async.AwaitTaskWithCancellation170171172    /// **Description**173    ///174    /// Closes the WebSocket connection as an asynchronous operation using the close handshake defined in the http://too  175    ///  176    /// **Parameters** - 0177    ///   * `websocket` - parameter of type `WebSocket`177    ///   * `websocket` - parameter of type `WebSocket`  178    ///   * `closeStatus` - parameter of type `WebSocketCloseStatus` - Indicates the reason for closing the WebSocket co - 0179    ///   * `statusDescription` - parameter of type `string` -  Specifies a human readable explanation as to why the con - 0180    /// - 0181    /// **Output Type**179    ///   * `statusDescription` - parameter of type `string` -  Specifies a human readable explanation as to why the con180    ///181    /// **Output Type**  182    ///   * `Async<unit>`  183    ///  184    /// **Exceptions** - 0185    ///185    ///  186    let asyncClose (websocket : WebSocket) (closeStatus : WebSocketCloseStatus) (statusDescription : string)  = - 0187        fun ct -> websocket.CloseAsync(closeStatus, statusDescription, ct) - 0188        |> Async.AwaitTaskWithCancellation - 0189        |> Async.Catch - 0190187        fun ct -> websocket.CloseAsync(closeStatus, statusDescription, ct)188        |> Async.AwaitTaskWithCancellation189        |> Async.Catch190  191  192    /// **Description**  193    /// - 0194    /// Initiates or completes the close handshake defined in the http://tools.ietf.org/html/draft-ietf-hybi-thewebsocke194    /// Initiates or completes the close handshake defined in the http://tools.ietf.org/html/draft-ietf-hybi-thewebsocke  195    ///  196    /// **Parameters** - 0197    ///   * `websocket` - parameter of type `WebSocket`197    ///   * `websocket` - parameter of type `WebSocket`  198    ///   * `closeStatus` - parameter of type `WebSocketCloseStatus` - Indicates the reason for closing the WebSocket co  199    ///   * `statusDescription` - parameter of type `string`Specifies a human readable explanation as to why the connect  200    /// @@ -295,10 +301,10 @@

 226    ///  227    let sendMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (readableStream : #IO.S  228        let buffer =229            #if NETSTANDARD2_1230            arrayPool.Rent(bufferSize)229            #if NETSTANDARD2_0 || NET461230            Array.create (bufferSize) Byte.MinValue  231            #else232            Array.create (bufferSize) Byte.MinValue232            arrayPool.Rent(bufferSize)  233            #endif  234  235        let rec sendMessage' () = async { @@ -313,10 +319,10 @@

 244        try  245            return! sendMessage'()  246        finally247            #if NETSTANDARD2_1248            arrayPool.Return(buffer,true)247            #if NETSTANDARD2_0 || NET461248            ()  249            #else250            ()250            arrayPool.Return(buffer,true)  251            #endif  252    }  253 @@ -365,10 +371,10 @@

 296    ///  297    let receiveMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (writeableStream : I  298        let innerbuffer =299            #if NETSTANDARD2_1300            arrayPool.Rent(bufferSize)299            #if NETSTANDARD2_0 || NET461300            Array.create (bufferSize) Byte.MinValue  301            #else302            Array.create (bufferSize) Byte.MinValue302            arrayPool.Rent(bufferSize)  303            #endif  304        let buffer = new ArraySegment<Byte>(innerbuffer)  305 @@ -391,10 +397,10 @@

 322        try  323            return! readTillEnd' ()  324        finally325            #if NETSTANDARD2_1326            arrayPool.Return(innerbuffer,true)325            #if NETSTANDARD2_0 || NET461326            ()  327            #else328            ()328            arrayPool.Return(innerbuffer,true)  329            #endif  330  331    } @@ -454,16 +460,16 @@

 385        interface IDisposable with  386            /// Used to clean up unmanaged resources for ASP.NET and self-hosted implementations.  387            member x.Dispose() =388                x.websocket.Dispose() + 6388                x.websocket.Dispose()  389        /// Returns the current state of the WebSocket connection.  390        member x.State =391            x.websocket.State + 0391            x.websocket.State  392        /// Indicates the reason why the remote endpoint initiated the close handshake.  393        member x.CloseStatus =394            x.websocket.CloseStatus |> Option.ofNullable + 0394            x.websocket.CloseStatus |> Option.ofNullable  395        ///Allows the remote endpoint to describe the reason why the connection was closed.  396        member x.CloseStatusDescription =397            x.websocket.CloseStatusDescription + 0397            x.websocket.CloseStatusDescription  398  399  400    /// **Description** @@ -491,34 +497,34 @@

 422        let inline wrap' a = wrap (Async.Catch a)  423  424        let sendAgent = MailboxProcessor<SendMessages>.Start(fun inbox ->425            let rec loop () = async {426                let! message = inbox.Receive()427                if webSocket |> WebSocket.isWebsocketOpen then + 12425            let rec loop () = async { + 12426                let! message = inbox.Receive() + 18427                if webSocket |> WebSocket.isWebsocketOpen then  428                    match message with  429                    | Send (buffer, messageType, stream, replyChannel) ->430                        do! wrap' (WebSocket.sendMessage webSocket buffer messageType stream ) replyChannel431                        return! loop () + 24430                        do! wrap' (WebSocket.sendMessage webSocket buffer messageType stream ) replyChannel + 6431                        return! loop ()  432                    | Close (status, message, replyChannel) ->433                        do! wrap (WebSocket.asyncClose webSocket status message) replyChannel + 9433                        do! wrap (WebSocket.asyncClose webSocket status message) replyChannel  434                    | CloseOutput (status, message, replyChannel) ->435                        do! wrap (WebSocket.asyncCloseOutput webSocket status message) replyChannel + 9435                        do! wrap (WebSocket.asyncCloseOutput webSocket status message) replyChannel  436            }437            loop () + 12437            loop ()  438        )  439        let receiveAgent = MailboxProcessor<ReceiveMessage>.Start(fun inbox ->440            let rec loop () = async {441                let! (buffer, messageType, stream, replyChannel) = inbox.Receive()442                if webSocket |> WebSocket.isWebsocketOpen then443                    do! wrap' (WebSocket.receiveMessage webSocket buffer messageType stream) replyChannel444                    return! loop () + 12440            let rec loop () = async { + 12441                let! (buffer, messageType, stream, replyChannel) = inbox.Receive() + 6442                if webSocket |> WebSocket.isWebsocketOpen then + 24443                    do! wrap' (WebSocket.receiveMessage webSocket buffer messageType stream) replyChannel + 6444                    return! loop ()  445            }446            loop () + 12446            loop ()  447        )448        {449            websocket = webSocket450            sendChannel = sendAgent451            receiveChannel = receiveAgent452        } + 6448        { + 6449            websocket = webSocket + 6450            sendChannel = sendAgent + 6451            receiveChannel = receiveAgent + 6452        }  453  454  455 @@ -539,7 +545,7 @@

 470    /// **Exceptions**  471    ///  472    let sendMessage (threadSafeWebSocket : ThreadSafeWebSocket) (bufferSize : int) (messageType : WebSocketMessageType) 473        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> Send(bufferSize, messageType, readableStream, rep + 12473        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> Send(bufferSize, messageType, readableStream, rep  474  475  476    /// **Description** @@ -555,9 +561,9 @@

 486    ///  487    /// **Exceptions**  488    ///489    let sendMessageAsUTF8(threadSafeWebSocket : ThreadSafeWebSocket) (text : string) = async {490        use stream = IO.MemoryStream.UTF8toMemoryStream text491        return! sendMessage threadSafeWebSocket  WebSocket.DefaultBufferSize  WebSocketMessageType.Text stream + 6489    let sendMessageAsUTF8(threadSafeWebSocket : ThreadSafeWebSocket) (text : string) = async { + 6490        use stream = IO.MemoryStream.UTF8toMemoryStream text + 6491        return! sendMessage threadSafeWebSocket  WebSocket.DefaultBufferSize  WebSocketMessageType.Text stream  492    }  493  494 @@ -577,7 +583,7 @@

 508    /// **Exceptions**  509    ///  510    let receiveMessage (threadSafeWebSocket : ThreadSafeWebSocket) (bufferSize : int) (messageType : WebSocketMessageTyp511        threadSafeWebSocket.receiveChannel.PostAndAsyncReply(fun reply -> bufferSize, messageType, writeableStream, repl + 12511        threadSafeWebSocket.receiveChannel.PostAndAsyncReply(fun reply -> bufferSize, messageType, writeableStream, repl  512  513  514    /// **Description** @@ -592,15 +598,15 @@

 523    ///  524    /// **Exceptions**  525    ///526    let receiveMessageAsUTF8 (threadSafeWebSocket : ThreadSafeWebSocket) = async {527        use stream = recyclableMemoryStreamManager.GetStream()528        let! response = receiveMessage threadSafeWebSocket WebSocket.DefaultBufferSize  WebSocketMessageType.Text stream + 6526    let receiveMessageAsUTF8 (threadSafeWebSocket : ThreadSafeWebSocket) = async { + 6527        use stream = recyclableMemoryStreamManager.GetStream() + 6528        let! response = receiveMessage threadSafeWebSocket WebSocket.DefaultBufferSize  WebSocketMessageType.Text stream  529        match response with  530        | Ok (WebSocket.ReceiveStreamResult.Stream s) ->531            return stream |> IO.MemoryStream.ToUTF8String |> WebSocket.ReceiveUTF8Result.String |> Ok + 6531            return stream |> IO.MemoryStream.ToUTF8String |> WebSocket.ReceiveUTF8Result.String |> Ok  532        | Ok (WebSocket.Closed(status, reason)) ->533            return Ok (WebSocket.ReceiveUTF8Result.Closed(status, reason))534        | Error ex -> return Error ex + 0533            return Ok (WebSocket.ReceiveUTF8Result.Closed(status, reason)) + 0534        | Error ex -> return Error ex  535  536    }  537 @@ -620,7 +626,7 @@

 551    /// **Exceptions**  552    ///  553    let close (threadSafeWebSocket : ThreadSafeWebSocket)  (closeStatus : WebSocketCloseStatus) (statusDescription : str554        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> Close(closeStatus, statusDescription, reply)) + 6554        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> Close(closeStatus, statusDescription, reply))  555  556  557    /// **Description** @@ -638,47 +644,51 @@

 569    /// **Exceptions**  570    ///  571    let closeOutput (threadSafeWebSocket : ThreadSafeWebSocket) (closeStatus : WebSocketCloseStatus) (statusDescription 572        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> CloseOutput(closeStatus, statusDescription, reply + 6572        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> CloseOutput(closeStatus, statusDescription, reply -

+

Methods/Properties

-System-IDisposable-Dispose()
-State()
-CloseStatus()
-CloseStatusDescription()
-createFromWebSocket(System.Net.WebSockets.WebSocket)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(FSharp.Control.Websockets.ThreadSafeWebsocket/SendMessages)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Control.FSharpMailboxProcessor`1<FSharp.Control.Websockets.ThreadSafeWebsocket/SendMessages>)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(System.Tuple`4<System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>>)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Control.FSharpMailboxProcessor`1<System.Tuple`4<System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>>>)
-sendMessage(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream)
-Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>)
-sendMessageAsUTF8(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket,System.String)
-Invoke(System.IO.MemoryStream)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.Unit)
-receiveMessage(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream)
-Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>)
-receiveMessageAsUTF8(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket)
-Invoke(System.IO.MemoryStream)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.Unit)
-close(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket,System.Net.WebSockets.WebSocketCloseStatus,System.String)
-Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>)
-closeOutput(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket,System.Net.WebSockets.WebSocketCloseStatus,System.String)
-Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>)
+System-IDisposable-Dispose()
+State()
+CloseStatus()
+CloseStatusDescription()
+loop@425(System.Net.WebSockets.WebSocket,Microsoft.FSharp.Control.FSharpMailboxProcessor`1<FSharp.Control.Websockets.ThreadSafeWebSocket/SendMessages>,Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(FSharp.Control.Websockets.ThreadSafeWebSocket/SendMessages)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<Microsoft.FSharp.Core.Unit,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
+Invoke(Microsoft.FSharp.Control.FSharpAsync`1<Microsoft.FSharp.Core.Unit>)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Control.FSharpMailboxProcessor`1<FSharp.Control.Websockets.ThreadSafeWebSocket/SendMessages>)
+loop@440-1(System.Net.WebSockets.WebSocket,Microsoft.FSharp.Control.FSharpMailboxProcessor`1<System.Tuple`4<System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>>>,Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(System.Tuple`4<System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>>)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
+Invoke(Microsoft.FSharp.Control.FSharpAsync`1<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult>)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Control.FSharpMailboxProcessor`1<System.Tuple`4<System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>>>)
+createFromWebSocket(System.Net.WebSockets.WebSocket)
+sendMessage(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,a)
+Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<Microsoft.FSharp.Core.Unit,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
+sendMessageAsUTF8(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket,System.String)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(System.IO.MemoryStream)
+receiveMessage(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream)
+Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
+receiveMessageAsUTF8(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(System.IO.MemoryStream)
+Invoke(Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>)
+close(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Net.WebSockets.WebSocketCloseStatus,System.String)
+Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<Microsoft.FSharp.Core.Unit,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
+closeOutput(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Net.WebSockets.WebSocketCloseStatus,System.String)
+Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<Microsoft.FSharp.Core.Unit,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)

diff --git a/docs/coverage/FSharp.Control.Websockets_ThreadSafeWebsocket.htm b/docs/coverage/FSharp.Control.Websockets_ThreadSafeWebsocket.htm index 53952d8..8463a0a 100644 --- a/docs/coverage/FSharp.Control.Websockets_ThreadSafeWebsocket.htm +++ b/docs/coverage/FSharp.Control.Websockets_ThreadSafeWebsocket.htm @@ -4,7 +4,7 @@ -FSharp.Control.Websockets.ThreadSafeWebSocket - Coverage Report +FSharp.Control.Websockets.ThreadSafeWebsocket - Coverage Report

Summary

@@ -14,69 +14,52 @@

Summary

-Class:FSharp.Control.Websockets.ThreadSafeWebSocket +Class:FSharp.Control.Websockets.ThreadSafeWebsocket Assembly:FSharp.Control.Websockets File(s):/Users/jimmybyrd/Documents/GitHub/FSharp.Control.Websockets/src/FSharp.Control.Websockets/FSharp.Control.Websockets.fs -Covered lines:43 -Uncovered lines:10 -Coverable lines:53 +Covered lines:0 +Uncovered lines:49 +Coverable lines:49 Total lines:572 -Line coverage:81.1% -Branch coverage:57.1% +Line coverage:0% +Branch coverage:0%

Metrics

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage Crap Score
createFromWebSocket(...)1010001
sendMessage(...)1010001
sendMessageAsUTF8(...)1010001
receiveMessage(...)1010001
receiveMessageAsUTF8(...)1010001
close(...)1010001
closeOutput(...)1010001
System-IDisposable-Dispose()1010001
Invoke(...)22000
Invoke(...)10000
Invoke(...)10000
Invoke(...)20000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)2010002
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)2010002
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)2010002
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)4888.8985.714.02
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)2010002
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)227566.672.06
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)3442.86604.68
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
createFromWebSocket(...)10000
sendMessage(...)10000
sendMessageAsUTF8(...)10000
receiveMessage(...)10000
receiveMessageAsUTF8(...)10000
close(...)10000
closeOutput(...)10000
System-IDisposable-Dispose()10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)48000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)22000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000
Invoke(...)10000

File(s)

@@ -215,72 +198,72 @@

 129    /// **Exceptions**  130    ///  131    let isWebsocketOpen (socket : WebSocket) =132        socket.State = WebSocketState.Open + 0132        socket.State = WebSocketState.Open  133134    /// **Description** + 0134    /// **Description**  135    ///136    /// Receives data from the `System.Net.WebSockets.WebSocket` connection asynchronously. + 0136    /// Receives data from the `System.Net.WebSockets.WebSocket` connection asynchronously.  137    ///138    /// **Parameters** + 0138    /// **Parameters**  139    ///   * `websocket` - parameter of type `WebSocket`  140    ///   * `buffer` - parameter of type `ArraySegment<byte>` - References the application buffer that is the storage lo141    ///142    /// **Output Type**143    ///   * `Async<WebSocketReceiveResult>` - An instance of this class represents the result of performing a single Rec144    ///145    /// **Exceptions**146    ///147    let asyncReceive (websocket : WebSocket) (buffer : ArraySegment<byte>)  =148        fun ct ->  websocket.ReceiveAsync(buffer,ct)149        |> Async.AwaitTaskWithCancellation150151152    /// **Description**153    ///154    /// Sends data over the `System.Net.WebSockets.WebSocket` connection asynchronously.155    ///156    /// **Parameters**157    ///   * `websocket` - parameter of type `WebSocket`158    ///   * `buffer` - parameter of type `ArraySegment<byte>` - The buffer to be sent over the connection.159    ///   * `messageType` - parameter of type `WebSocketMessageType`- Indicates whether the application is sending a bin160    ///   * `endOfMessage` - parameter of type `bool` - Indicates whether the data in `buffer` is the last part of a mes161    ///162    /// **Output Type**163    ///   * `Async<unit>`164    ///165    /// **Exceptions**166    ///167    let asyncSend (websocket : WebSocket) (buffer : ArraySegment<byte>) (messageType : WebSocketMessageType) (endOfMessa168        fun ct ->  websocket.SendAsync(buffer, messageType, endOfMessage, ct)169        |> Async.AwaitTaskWithCancellation170171172    /// **Description**173    ///174    /// Closes the WebSocket connection as an asynchronous operation using the close handshake defined in the http://too + 0141    /// + 0142    /// **Output Type** + 0143    ///   * `Async<WebSocketReceiveResult>` - An instance of this class represents the result of performing a single Rec + 0144    /// + 0145    /// **Exceptions** + 0146    /// + 0147    let asyncReceive (websocket : WebSocket) (buffer : ArraySegment<byte>)  = + 0148        fun ct ->  websocket.ReceiveAsync(buffer,ct) + 0149        |> Async.AwaitTaskWithCancellation + 0150 + 0151 + 0152    /// **Description** + 0153    /// + 0154    /// Sends data over the `System.Net.WebSockets.WebSocket` connection asynchronously. + 0155    /// + 0156    /// **Parameters** + 0157    ///   * `websocket` - parameter of type `WebSocket` + 0158    ///   * `buffer` - parameter of type `ArraySegment<byte>` - The buffer to be sent over the connection. + 0159    ///   * `messageType` - parameter of type `WebSocketMessageType`- Indicates whether the application is sending a bin + 0160    ///   * `endOfMessage` - parameter of type `bool` - Indicates whether the data in `buffer` is the last part of a mes + 0161    /// + 0162    /// **Output Type** + 0163    ///   * `Async<unit>` + 0164    /// + 0165    /// **Exceptions** + 0166    /// + 0167    let asyncSend (websocket : WebSocket) (buffer : ArraySegment<byte>) (messageType : WebSocketMessageType) (endOfMessa + 0168        fun ct ->  websocket.SendAsync(buffer, messageType, endOfMessage, ct) + 0169        |> Async.AwaitTaskWithCancellation + 0170 + 0171 + 0172    /// **Description** + 0173    /// + 0174    /// Closes the WebSocket connection as an asynchronous operation using the close handshake defined in the http://too  175    ///  176    /// **Parameters**177    ///   * `websocket` - parameter of type `WebSocket` + 0177    ///   * `websocket` - parameter of type `WebSocket`  178    ///   * `closeStatus` - parameter of type `WebSocketCloseStatus` - Indicates the reason for closing the WebSocket co179    ///   * `statusDescription` - parameter of type `string` -  Specifies a human readable explanation as to why the con180    ///181    /// **Output Type** + 0179    ///   * `statusDescription` - parameter of type `string` -  Specifies a human readable explanation as to why the con + 0180    /// + 0181    /// **Output Type**  182    ///   * `Async<unit>`  183    ///  184    /// **Exceptions**185    /// + 0185    ///  186    let asyncClose (websocket : WebSocket) (closeStatus : WebSocketCloseStatus) (statusDescription : string)  =187        fun ct -> websocket.CloseAsync(closeStatus, statusDescription, ct)188        |> Async.AwaitTaskWithCancellation189        |> Async.Catch190 + 0187        fun ct -> websocket.CloseAsync(closeStatus, statusDescription, ct) + 0188        |> Async.AwaitTaskWithCancellation + 0189        |> Async.Catch + 0190  191  192    /// **Description**  193    ///194    /// Initiates or completes the close handshake defined in the http://tools.ietf.org/html/draft-ietf-hybi-thewebsocke + 0194    /// Initiates or completes the close handshake defined in the http://tools.ietf.org/html/draft-ietf-hybi-thewebsocke  195    ///  196    /// **Parameters**197    ///   * `websocket` - parameter of type `WebSocket` + 0197    ///   * `websocket` - parameter of type `WebSocket`  198    ///   * `closeStatus` - parameter of type `WebSocketCloseStatus` - Indicates the reason for closing the WebSocket co  199    ///   * `statusDescription` - parameter of type `string`Specifies a human readable explanation as to why the connect  200    /// @@ -312,10 +295,10 @@

 226    ///  227    let sendMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (readableStream : #IO.S  228        let buffer =229            #if NETSTANDARD2_1230            arrayPool.Rent(bufferSize)229            #if NETSTANDARD2_0 || NET461230            Array.create (bufferSize) Byte.MinValue  231            #else232            Array.create (bufferSize) Byte.MinValue232            arrayPool.Rent(bufferSize)  233            #endif  234  235        let rec sendMessage' () = async { @@ -330,10 +313,10 @@

 244        try  245            return! sendMessage'()  246        finally247            #if NETSTANDARD2_1248            arrayPool.Return(buffer,true)247            #if NETSTANDARD2_0 || NET461248            ()  249            #else250            ()250            arrayPool.Return(buffer,true)  251            #endif  252    }  253 @@ -382,10 +365,10 @@

 296    ///  297    let receiveMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (writeableStream : I  298        let innerbuffer =299            #if NETSTANDARD2_1300            arrayPool.Rent(bufferSize)299            #if NETSTANDARD2_0 || NET461300            Array.create (bufferSize) Byte.MinValue  301            #else302            Array.create (bufferSize) Byte.MinValue302            arrayPool.Rent(bufferSize)  303            #endif  304        let buffer = new ArraySegment<Byte>(innerbuffer)  305 @@ -408,10 +391,10 @@

 322        try  323            return! readTillEnd' ()  324        finally325            #if NETSTANDARD2_1326            arrayPool.Return(innerbuffer,true)325            #if NETSTANDARD2_0 || NET461326            ()  327            #else328            ()328            arrayPool.Return(innerbuffer,true)  329            #endif  330  331    } @@ -471,16 +454,16 @@

 385        interface IDisposable with  386            /// Used to clean up unmanaged resources for ASP.NET and self-hosted implementations.  387            member x.Dispose() = - 6388                x.websocket.Dispose()388                x.websocket.Dispose()  389        /// Returns the current state of the WebSocket connection.  390        member x.State = - 12391            x.websocket.State391            x.websocket.State  392        /// Indicates the reason why the remote endpoint initiated the close handshake.  393        member x.CloseStatus = - 0394            x.websocket.CloseStatus |> Option.ofNullable394            x.websocket.CloseStatus |> Option.ofNullable  395        ///Allows the remote endpoint to describe the reason why the connection was closed.  396        member x.CloseStatusDescription = - 0397            x.websocket.CloseStatusDescription397            x.websocket.CloseStatusDescription  398  399  400    /// **Description** @@ -497,45 +480,45 @@

 411    ///  412    let createFromWebSocket (webSocket : WebSocket) =  413        /// handle executing a task in a try/catch and wrapping up the callstack info for later - 0414        let inline wrap (action: Async<Choice<_,exn>>) (reply: AsyncReplyChannel<_>) = async { - 0415            match! action with - 0416            | Choice1Of2 result -> reply.Reply(Ok result)414        let inline wrap (action: Async<Choice<_,exn>>) (reply: AsyncReplyChannel<_>) = async {415            match! action with416            | Choice1Of2 result -> reply.Reply(Ok result)  417            | Choice2Of2 ex -> - 0418                let dispatch = ExceptionDispatchInfo.Capture ex - 0419                reply.Reply(Error dispatch)418                let dispatch = ExceptionDispatchInfo.Capture ex419                reply.Reply(Error dispatch)  420        }  421 - 0422        let inline wrap' a = wrap (Async.Catch a)422        let inline wrap' a = wrap (Async.Catch a)  423 - 6424        let sendAgent = MailboxProcessor<SendMessages>.Start(fun inbox -> - 18425            let rec loop () = async { - 30426                let! message = inbox.Receive() - 18427                if webSocket |> WebSocket.isWebsocketOpen then - 24428                    match message with - 6429                    | Send (buffer, messageType, stream, replyChannel) -> - 42430                        do! wrap' (WebSocket.sendMessage webSocket buffer messageType stream ) replyChannel - 12431                        return! loop () - 6432                    | Close (status, message, replyChannel) -> - 18433                        do! wrap (WebSocket.asyncClose webSocket status message) replyChannel - 6434                    | CloseOutput (status, message, replyChannel) -> - 18435                        do! wrap (WebSocket.asyncCloseOutput webSocket status message) replyChannel - 6436            } - 12437            loop () - 6438        ) - 6439        let receiveAgent = MailboxProcessor<ReceiveMessage>.Start(fun inbox -> - 18440            let rec loop () = async { - 24441                let! (buffer, messageType, stream, replyChannel) = inbox.Receive() - 12442                if webSocket |> WebSocket.isWebsocketOpen then - 42443                    do! wrap' (WebSocket.receiveMessage webSocket buffer messageType stream) replyChannel - 12444                    return! loop () - 6445            } - 12446            loop () - 6447        ) - 6448        { - 6449            websocket = webSocket - 6450            sendChannel = sendAgent - 6451            receiveChannel = receiveAgent - 6452        }424        let sendAgent = MailboxProcessor<SendMessages>.Start(fun inbox ->425            let rec loop () = async {426                let! message = inbox.Receive()427                if webSocket |> WebSocket.isWebsocketOpen then428                    match message with429                    | Send (buffer, messageType, stream, replyChannel) ->430                        do! wrap' (WebSocket.sendMessage webSocket buffer messageType stream ) replyChannel431                        return! loop ()432                    | Close (status, message, replyChannel) ->433                        do! wrap (WebSocket.asyncClose webSocket status message) replyChannel434                    | CloseOutput (status, message, replyChannel) ->435                        do! wrap (WebSocket.asyncCloseOutput webSocket status message) replyChannel436            }437            loop ()438        )439        let receiveAgent = MailboxProcessor<ReceiveMessage>.Start(fun inbox ->440            let rec loop () = async {441                let! (buffer, messageType, stream, replyChannel) = inbox.Receive()442                if webSocket |> WebSocket.isWebsocketOpen then443                    do! wrap' (WebSocket.receiveMessage webSocket buffer messageType stream) replyChannel444                    return! loop ()445            }446            loop ()447        )448        {449            websocket = webSocket450            sendChannel = sendAgent451            receiveChannel = receiveAgent452        }  453  454  455 @@ -556,7 +539,7 @@

 470    /// **Exceptions**  471    ///  472    let sendMessage (threadSafeWebSocket : ThreadSafeWebSocket) (bufferSize : int) (messageType : WebSocketMessageType)  - 12473        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> Send(bufferSize, messageType, readableStream, rep473        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> Send(bufferSize, messageType, readableStream, rep  474  475  476    /// **Description** @@ -572,9 +555,9 @@

 486    ///  487    /// **Exceptions**  488    /// - 6489    let sendMessageAsUTF8(threadSafeWebSocket : ThreadSafeWebSocket) (text : string) = async { - 12490        use stream = IO.MemoryStream.UTF8toMemoryStream text - 6491        return! sendMessage threadSafeWebSocket  WebSocket.DefaultBufferSize  WebSocketMessageType.Text stream489    let sendMessageAsUTF8(threadSafeWebSocket : ThreadSafeWebSocket) (text : string) = async {490        use stream = IO.MemoryStream.UTF8toMemoryStream text491        return! sendMessage threadSafeWebSocket  WebSocket.DefaultBufferSize  WebSocketMessageType.Text stream  492    }  493  494 @@ -594,7 +577,7 @@

 508    /// **Exceptions**  509    ///  510    let receiveMessage (threadSafeWebSocket : ThreadSafeWebSocket) (bufferSize : int) (messageType : WebSocketMessageTyp - 12511        threadSafeWebSocket.receiveChannel.PostAndAsyncReply(fun reply -> bufferSize, messageType, writeableStream, repl511        threadSafeWebSocket.receiveChannel.PostAndAsyncReply(fun reply -> bufferSize, messageType, writeableStream, repl  512  513  514    /// **Description** @@ -609,15 +592,15 @@

 523    ///  524    /// **Exceptions**  525    /// - 6526    let receiveMessageAsUTF8 (threadSafeWebSocket : ThreadSafeWebSocket) = async { - 12527        use stream = recyclableMemoryStreamManager.GetStream() - 12528        let! response = receiveMessage threadSafeWebSocket WebSocket.DefaultBufferSize  WebSocketMessageType.Text stream - 6529        match response with526    let receiveMessageAsUTF8 (threadSafeWebSocket : ThreadSafeWebSocket) = async {527        use stream = recyclableMemoryStreamManager.GetStream()528        let! response = receiveMessage threadSafeWebSocket WebSocket.DefaultBufferSize  WebSocketMessageType.Text stream529        match response with  530        | Ok (WebSocket.ReceiveStreamResult.Stream s) -> - 6531            return stream |> IO.MemoryStream.ToUTF8String |> WebSocket.ReceiveUTF8Result.String |> Ok531            return stream |> IO.MemoryStream.ToUTF8String |> WebSocket.ReceiveUTF8Result.String |> Ok  532        | Ok (WebSocket.Closed(status, reason)) -> - 0533            return Ok (WebSocket.ReceiveUTF8Result.Closed(status, reason)) - 0534        | Error ex -> return Error ex533            return Ok (WebSocket.ReceiveUTF8Result.Closed(status, reason))534        | Error ex -> return Error ex  535  536    }  537 @@ -637,7 +620,7 @@

 551    /// **Exceptions**  552    ///  553    let close (threadSafeWebSocket : ThreadSafeWebSocket)  (closeStatus : WebSocketCloseStatus) (statusDescription : str - 6554        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> Close(closeStatus, statusDescription, reply))554        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> Close(closeStatus, statusDescription, reply))  555  556  557    /// **Description** @@ -655,60 +638,47 @@

 569    /// **Exceptions**  570    ///  571    let closeOutput (threadSafeWebSocket : ThreadSafeWebSocket) (closeStatus : WebSocketCloseStatus) (statusDescription  - 6572        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> CloseOutput(closeStatus, statusDescription, reply572        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> CloseOutput(closeStatus, statusDescription, reply -

+

Methods/Properties

-System-IDisposable-Dispose()
-State()
-CloseStatus()
-CloseStatusDescription()
-Invoke(Microsoft.FSharp.Control.FSharpAsync`1<Microsoft.FSharp.Core.FSharpChoice`2<a,System.Exception>>,Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<a,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
-Invoke(Microsoft.FSharp.Core.FSharpChoice`2<a,System.Exception>)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.FSharpChoice`2<a,System.Exception>)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<a,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
-Invoke(Microsoft.FSharp.Control.FSharpAsync`1<a>)
-createFromWebSocket(System.Net.WebSockets.WebSocket)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(FSharp.Control.Websockets.ThreadSafeWebSocket/SendMessages)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.FSharpChoice`2<Microsoft.FSharp.Core.Unit,System.Exception>)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<Microsoft.FSharp.Core.Unit,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
-Invoke(Microsoft.FSharp.Control.FSharpAsync`1<Microsoft.FSharp.Core.Unit>)
-Invoke(Microsoft.FSharp.Core.FSharpChoice`2<Microsoft.FSharp.Core.Unit,System.Exception>)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.FSharpChoice`2<Microsoft.FSharp.Core.Unit,System.Exception>)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Control.FSharpMailboxProcessor`1<FSharp.Control.Websockets.ThreadSafeWebSocket/SendMessages>)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(System.Tuple`4<System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>>)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.FSharpChoice`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Exception>)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
-Invoke(Microsoft.FSharp.Control.FSharpAsync`1<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult>)
-Invoke(Microsoft.FSharp.Control.FSharpMailboxProcessor`1<System.Tuple`4<System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>>>)
-sendMessage(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,a)
-Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<Microsoft.FSharp.Core.Unit,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
-sendMessageAsUTF8(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket,System.String)
-Invoke(System.IO.MemoryStream)
-Invoke(Microsoft.FSharp.Core.Unit)
-receiveMessage(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream)
-Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
-receiveMessageAsUTF8(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket)
-Invoke(System.IO.MemoryStream)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.FSharpResult`2<FSharp.Control.Websockets.WebSocket/ReceiveStreamResult,System.Runtime.ExceptionServices.ExceptionDispatchInfo>)
-close(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Net.WebSockets.WebSocketCloseStatus,System.String)
-Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<Microsoft.FSharp.Core.Unit,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
-closeOutput(FSharp.Control.Websockets.ThreadSafeWebSocket/ThreadSafeWebSocket,System.Net.WebSockets.WebSocketCloseStatus,System.String)
-Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.FSharpResult`2<Microsoft.FSharp.Core.Unit,System.Runtime.ExceptionServices.ExceptionDispatchInfo>>)
+System-IDisposable-Dispose()
+State()
+CloseStatus()
+CloseStatusDescription()
+createFromWebSocket(System.Net.WebSockets.WebSocket)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(FSharp.Control.Websockets.ThreadSafeWebsocket/SendMessages)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Control.FSharpMailboxProcessor`1<FSharp.Control.Websockets.ThreadSafeWebsocket/SendMessages>)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(System.Tuple`4<System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>>)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Control.FSharpMailboxProcessor`1<System.Tuple`4<System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>>>)
+sendMessage(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream)
+Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>)
+sendMessageAsUTF8(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket,System.String)
+Invoke(System.IO.MemoryStream)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
+receiveMessage(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream)
+Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>)
+receiveMessageAsUTF8(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket)
+Invoke(System.IO.MemoryStream)
+Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
+close(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket,System.Net.WebSockets.WebSocketCloseStatus,System.String)
+Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>)
+closeOutput(FSharp.Control.Websockets.ThreadSafeWebsocket/ThreadSafeWebSocket,System.Net.WebSockets.WebSocketCloseStatus,System.String)
+Invoke(Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1<Microsoft.FSharp.Core.Unit>)

diff --git a/docs/coverage/FSharp.Control.Websockets_WebSocket.htm b/docs/coverage/FSharp.Control.Websockets_WebSocket.htm index e86896c..ffa21bf 100644 --- a/docs/coverage/FSharp.Control.Websockets_WebSocket.htm +++ b/docs/coverage/FSharp.Control.Websockets_WebSocket.htm @@ -17,53 +17,55 @@

Summary

Class:FSharp.Control.Websockets.WebSocket Assembly:FSharp.Control.Websockets File(s):/Users/jimmybyrd/Documents/GitHub/FSharp.Control.Websockets/src/FSharp.Control.Websockets/FSharp.Control.Websockets.fs -Covered lines:56 -Uncovered lines:0 +Covered lines:55 +Uncovered lines:1 Coverable lines:56 Total lines:572 -Line coverage:100% -Branch coverage:83.3% +Line coverage:98.2% +Branch coverage:66.6%

Metrics

- + + + + + - - - - - - + - + + + + + - - - - - - - + - - + + + + + + + - - + +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage Crap Score
isWebsocketOpen(...)1010001
isWebsocketOpen(...)10000
asyncReceive(...)1010001
asyncSend(...)1010001
asyncClose(...)1010001
asyncCloseOutput(...)1010001
sendMessage'@235(...)1010001
sendMessage(...)1010001
sendMessageAsUTF8(...)1010001
readTillEnd'@306(...)1010001
receiveMessage(...)1010001
receiveMessageAsUTF8(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)221001002
Invoke(...)2266.6766.672.15
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)221001002
Invoke(...)2266.6766.672.15
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)221001002
Invoke(...)1010001
Invoke(...)5487.5805.05
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)221001002
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)221001002
Invoke(...)1010001
Invoke(...)588057.145.2
Invoke(...)1010001
Invoke(...)2010002
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001
Invoke(...)1010001

File(s)

@@ -202,7 +204,7 @@

 129    /// **Exceptions**  130    ///  131    let isWebsocketOpen (socket : WebSocket) = - 42132        socket.State = WebSocketState.Open + 0132        socket.State = WebSocketState.Open  133  134    /// **Description**  135    /// @@ -218,8 +220,8 @@

 145    /// **Exceptions**  146    ///  147    let asyncReceive (websocket : WebSocket) (buffer : ArraySegment<byte>)  = - 30148        fun ct ->  websocket.ReceiveAsync(buffer,ct)149        |> Async.AwaitTaskWithCancellation + 60148        fun ct ->  websocket.ReceiveAsync(buffer,ct) + 30149        |> Async.AwaitTaskWithCancellation  150  151  152    /// **Description** @@ -238,8 +240,8 @@

 165    /// **Exceptions**  166    ///  167    let asyncSend (websocket : WebSocket) (buffer : ArraySegment<byte>) (messageType : WebSocketMessageType) (endOfMessa - 24168        fun ct ->  websocket.SendAsync(buffer, messageType, endOfMessage, ct)169        |> Async.AwaitTaskWithCancellation + 48168        fun ct ->  websocket.SendAsync(buffer, messageType, endOfMessage, ct) + 24169        |> Async.AwaitTaskWithCancellation  170  171  172    /// **Description** @@ -299,28 +301,28 @@

 226    ///  12227    let sendMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (readableStream : #IO.S  12228        let buffer = - 12229            #if NETSTANDARD2_1 - 12230            arrayPool.Rent(bufferSize) - 8231            #else - 8232            Array.create (bufferSize) Byte.MinValue + 12229            #if NETSTANDARD2_0 || NET461 + 12230            Array.create (bufferSize) Byte.MinValue + 4231            #else + 4232            arrayPool.Rent(bufferSize)  233            #endif  234  24235        let rec sendMessage' () = async {  24236            if isWebsocketOpen socket then - 48237                let! read = readableStream.AsyncRead(buffer, 0, buffer.Length) + 24237                let! read = readableStream.AsyncRead(buffer, 0, buffer.Length)  24238                if read > 0 then - 24239                    do! asyncSend socket (ArraySegment(buffer |> Array.take read))  messageType false + 12239                    do! asyncSend socket (ArraySegment(buffer |> Array.take read))  messageType false  12240                    return! sendMessage'()  241                else  24242                    do! (asyncSend socket (ArraySegment(Array.empty))  messageType true)  243        } - 12244        try + 24244        try  12245            return! sendMessage'()  246        finally247            #if NETSTANDARD2_1 - 4248            arrayPool.Return(buffer,true)247            #if NETSTANDARD2_0 || NET461 + 8248            ()  249            #else - 8250            () + 4250            arrayPool.Return(buffer,true)  251            #endif  252    }  253 @@ -339,7 +341,7 @@

 266    /// **Exceptions**  267    ///  6268    let sendMessageAsUTF8 (socket : WebSocket) (text : string) = async { - 12269        use stream = IO.MemoryStream.UTF8toMemoryStream text + 6269        use stream = IO.MemoryStream.UTF8toMemoryStream text  6270        return! sendMessage socket DefaultBufferSize WebSocketMessageType.Text stream  271    }  272 @@ -369,36 +371,36 @@

 296    ///  18297    let receiveMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (writeableStream : I  18298        let innerbuffer = - 18299            #if NETSTANDARD2_1 - 18300            arrayPool.Rent(bufferSize) - 12301            #else - 12302            Array.create (bufferSize) Byte.MinValue + 18299            #if NETSTANDARD2_0 || NET461 + 18300            Array.create (bufferSize) Byte.MinValue + 6301            #else + 6302            arrayPool.Rent(bufferSize)  303            #endif  18304        let buffer = new ArraySegment<Byte>(innerbuffer)  305  30306        let rec readTillEnd' () = async { - 60307            let! result  = asyncReceive socket buffer - 54308            match result with + 30307            let! result  = asyncReceive socket buffer308            match result with  309            | result when result.MessageType = WebSocketMessageType.Close || socket.State = WebSocketState.CloseReceived  310                // printfn "Close received! %A - %A" socket.CloseStatus socket.CloseStatusDescription - 12311                let! _ = asyncCloseOutput socket WebSocketCloseStatus.NormalClosure "Close received by client" + 6311                let! _ = asyncCloseOutput socket WebSocketCloseStatus.NormalClosure "Close received by client"  6312                return ReceiveStreamResult.Closed(socket.CloseStatus.Value, socket.CloseStatusDescription)  313            | result ->  314                // printfn "result.MessageType -> %A" result.MessageType  72315                if result.MessageType <> messageType then return () - 48316                do! writeableStream.AsyncWrite(buffer.Array, 0, result.Count) + 24316                do! writeableStream.AsyncWrite(buffer.Array, 0, result.Count)  24317                if result.EndOfMessage then  12318                    return Stream writeableStream  319                else  12320                    return! readTillEnd' ()  321        } - 18322        try + 36322        try  18323            return! readTillEnd' ()  324        finally325            #if NETSTANDARD2_1 - 6326            arrayPool.Return(innerbuffer,true)325            #if NETSTANDARD2_0 || NET461 + 12326            ()  327            #else - 12328            () + 6328            arrayPool.Return(innerbuffer,true)  329            #endif  330  331    } @@ -425,9 +427,9 @@

 352    /// **Exceptions**  353    ///  12354    let receiveMessageAsUTF8 (socket : WebSocket) = async { - 24355        use stream =  recyclableMemoryStreamManager.GetStream() - 24356        let! result = receiveMessage socket DefaultBufferSize WebSocketMessageType.Text stream - 18357        match result with + 12355        use stream =  recyclableMemoryStreamManager.GetStream() + 12356        let! result = receiveMessage socket DefaultBufferSize WebSocketMessageType.Text stream357        match result with  358        | ReceiveStreamResult.Stream s ->  6359            return stream |> IO.MemoryStream.ToUTF8String |> String |> Ok  360        | ReceiveStreamResult.Closed(status, reason) -> @@ -645,12 +647,14 @@

 572        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> CloseOutput(closeStatus, statusDescription, reply - +

Methods/Properties

isWebsocketOpen(System.Net.WebSockets.WebSocket)
+asyncReceive(System.Net.WebSockets.WebSocket,System.ArraySegment`1<System.Byte>)
Invoke(System.Threading.CancellationToken)
+asyncSend(System.Net.WebSockets.WebSocket,System.ArraySegment`1<System.Byte>,System.Net.WebSockets.WebSocketMessageType,System.Boolean)
Invoke(System.Threading.CancellationToken)
asyncClose(System.Net.WebSockets.WebSocket,System.Net.WebSockets.WebSocketCloseStatus,System.String)
Invoke(System.Threading.CancellationToken)
@@ -658,31 +662,32 @@

Methods/Properties

Invoke(System.Threading.CancellationToken)
sendMessage(System.Net.WebSockets.WebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,a)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.Unit)
+sendMessage'@235(System.Net.WebSockets.WebSocket,System.Net.WebSockets.WebSocketMessageType,a,System.Byte[],Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(System.Int32)
-Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(System.Int32)
+Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
sendMessageAsUTF8(System.Net.WebSockets.WebSocket,System.String)
-Invoke(System.IO.MemoryStream)
Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(System.IO.MemoryStream)
receiveMessage(System.Net.WebSockets.WebSocket,System.Int32,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(System.Net.WebSockets.WebSocketReceiveResult)
+readTillEnd'@306(System.Net.WebSockets.WebSocket,System.Net.WebSockets.WebSocketMessageType,System.IO.Stream,System.ArraySegment`1<System.Byte>,Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(Microsoft.FSharp.Core.FSharpChoice`2<Microsoft.FSharp.Core.Unit,System.Exception>)
+Invoke(System.Net.WebSockets.WebSocketReceiveResult)
+Invoke(Microsoft.FSharp.Core.FSharpChoice`2<Microsoft.FSharp.Core.Unit,System.Exception>)
Invoke(Microsoft.FSharp.Core.Unit)
+Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
Invoke(Microsoft.FSharp.Core.Unit)
receiveMessageAsUTF8(System.Net.WebSockets.WebSocket)
-Invoke(System.IO.MemoryStream)
Invoke(Microsoft.FSharp.Core.Unit)
-Invoke(FSharp.Control.Websockets.WebSocket/ReceiveStreamResult)
+Invoke(System.IO.MemoryStream)
+Invoke(FSharp.Control.Websockets.WebSocket/ReceiveStreamResult)

diff --git a/docs/coverage/FSharp.Control.Websockets_Websocket2.htm b/docs/coverage/FSharp.Control.Websockets_Websocket2.htm index 6d64fb3..b2909d6 100644 --- a/docs/coverage/FSharp.Control.Websockets_Websocket2.htm +++ b/docs/coverage/FSharp.Control.Websockets_Websocket2.htm @@ -293,10 +293,10 @@

 226    ///  227    let sendMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (readableStream : #IO.S  228        let buffer =229            #if NETSTANDARD2_1230            arrayPool.Rent(bufferSize)229            #if NETSTANDARD2_0 || NET461230            Array.create (bufferSize) Byte.MinValue  231            #else232            Array.create (bufferSize) Byte.MinValue232            arrayPool.Rent(bufferSize)  233            #endif  234  235        let rec sendMessage' () = async { @@ -311,10 +311,10 @@

 244        try  245            return! sendMessage'()  246        finally247            #if NETSTANDARD2_1248            arrayPool.Return(buffer,true)247            #if NETSTANDARD2_0 || NET461248            ()  249            #else250            ()250            arrayPool.Return(buffer,true)  251            #endif  252    }  253 @@ -363,10 +363,10 @@

 296    ///  297    let receiveMessage (socket : WebSocket) (bufferSize : int) (messageType : WebSocketMessageType) (writeableStream : I  298        let innerbuffer =299            #if NETSTANDARD2_1300            arrayPool.Rent(bufferSize)299            #if NETSTANDARD2_0 || NET461300            Array.create (bufferSize) Byte.MinValue  301            #else302            Array.create (bufferSize) Byte.MinValue302            arrayPool.Rent(bufferSize)  303            #endif  304        let buffer = new ArraySegment<Byte>(innerbuffer)  305 @@ -389,10 +389,10 @@

 322        try  323            return! readTillEnd' ()  324        finally325            #if NETSTANDARD2_1326            arrayPool.Return(innerbuffer,true)325            #if NETSTANDARD2_0 || NET461326            ()  327            #else328            ()328            arrayPool.Return(innerbuffer,true)  329            #endif  330  331    } @@ -639,7 +639,7 @@

 572        threadSafeWebSocket.sendChannel.PostAndAsyncReply(fun reply -> CloseOutput(closeStatus, statusDescription, reply - +

Methods/Properties

diff --git a/docs/coverage/combined.js b/docs/coverage/combined.js index 3d0e105..79d5497 100644 --- a/docs/coverage/combined.js +++ b/docs/coverage/combined.js @@ -327,18 +327,18 @@ var assemblies = [ "classes": [ { "name": "FSharp.Control.Websockets.Async", "reportPath": "FSharp.Control.Websockets_Async.htm", "coveredLines": 2, "uncoveredLines": 6, "coverableLines": 8, "totalLines": 572, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, { "name": "FSharp.Control.Websockets.Stream", "reportPath": "FSharp.Control.Websockets_Stream.htm", "coveredLines": 6, "uncoveredLines": 7, "coverableLines": 13, "totalLines": 572, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, - { "name": "FSharp.Control.Websockets.ThreadSafeWebsocket", "reportPath": "FSharp.Control.Websockets_ThreadSafeWebsocket2.htm", "coveredLines": 0, "uncoveredLines": 49, "coverableLines": 49, "totalLines": 572, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 8, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, - { "name": "FSharp.Control.Websockets.ThreadSafeWebSocket", "reportPath": "FSharp.Control.Websockets_ThreadSafeWebSocket.htm", "coveredLines": 43, "uncoveredLines": 10, "coverableLines": 53, "totalLines": 572, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 8, "totalBranches": 14, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, + { "name": "FSharp.Control.Websockets.ThreadSafeWebsocket", "reportPath": "FSharp.Control.Websockets_ThreadSafeWebsocket.htm", "coveredLines": 0, "uncoveredLines": 49, "coverableLines": 49, "totalLines": 572, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 8, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, + { "name": "FSharp.Control.Websockets.ThreadSafeWebSocket", "reportPath": "FSharp.Control.Websockets_ThreadSafeWebSocket2.htm", "coveredLines": 31, "uncoveredLines": 5, "coverableLines": 36, "totalLines": 572, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 8, "totalBranches": 10, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, { "name": "FSharp.Control.Websockets.Websocket", "reportPath": "FSharp.Control.Websockets_Websocket2.htm", "coveredLines": 0, "uncoveredLines": 34, "coverableLines": 34, "totalLines": 572, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 8, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, - { "name": "FSharp.Control.Websockets.WebSocket", "reportPath": "FSharp.Control.Websockets_WebSocket.htm", "coveredLines": 56, "uncoveredLines": 0, "coverableLines": 56, "totalLines": 572, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 10, "totalBranches": 12, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, + { "name": "FSharp.Control.Websockets.WebSocket", "reportPath": "FSharp.Control.Websockets_WebSocket.htm", "coveredLines": 55, "uncoveredLines": 1, "coverableLines": 56, "totalLines": 572, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 8, "totalBranches": 12, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, { "name": "System.AssemblyVersionInformation", "reportPath": "FSharp.Control.Websockets_AssemblyVersionInformation.htm", "coveredLines": 0, "uncoveredLines": 0, "coverableLines": 0, "totalLines": 0, "coverageType": "MethodCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, ]}, { "name": "FSharp.Control.Websockets.TPL", "classes": [ { "name": "FSharp.Control.Websockets.TPL.Stream", "reportPath": "FSharp.Control.Websockets.TPL_Stream.htm", "coveredLines": 6, "uncoveredLines": 1, "coverableLines": 7, "totalLines": 568, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, - { "name": "FSharp.Control.Websockets.TPL.ThreadSafeWebSocket", "reportPath": "FSharp.Control.Websockets.TPL_ThreadSafeWebSocket.htm", "coveredLines": 49, "uncoveredLines": 12, "coverableLines": 61, "totalLines": 568, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 6, "totalBranches": 8, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, - { "name": "FSharp.Control.Websockets.TPL.WebSocket", "reportPath": "FSharp.Control.Websockets.TPL_WebSocket.htm", "coveredLines": 57, "uncoveredLines": 1, "coverableLines": 58, "totalLines": 568, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 9, "totalBranches": 10, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, + { "name": "FSharp.Control.Websockets.TPL.ThreadSafeWebSocket", "reportPath": "FSharp.Control.Websockets.TPL_ThreadSafeWebSocket.htm", "coveredLines": 46, "uncoveredLines": 3, "coverableLines": 49, "totalLines": 568, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, + { "name": "FSharp.Control.Websockets.TPL.WebSocket", "reportPath": "FSharp.Control.Websockets.TPL_WebSocket.htm", "coveredLines": 47, "uncoveredLines": 3, "coverableLines": 50, "totalLines": 568, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 5, "totalBranches": 8, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, { "name": "System.AssemblyVersionInformation", "reportPath": "FSharp.Control.Websockets.TPL_AssemblyVersionInformation.htm", "coveredLines": 0, "uncoveredLines": 0, "coverableLines": 0, "totalLines": 0, "coverageType": "MethodCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [], "historicCoverages": [] }, ]}, ]; diff --git a/docs/coverage/index.htm b/docs/coverage/index.htm index 092a59c..a602243 100644 --- a/docs/coverage/index.htm +++ b/docs/coverage/index.htm @@ -14,17 +14,17 @@

Summary

-Generated on:10/2/19 - 1:04:16 PM +Generated on:10/2/19 - 4:12:07 PM Parser:MultiReportParser (8x OpenCoverParser) Assemblies:2 Classes:11 Files:2 -Covered lines:219 -Uncovered lines:120 -Coverable lines:339 +Covered lines:193 +Uncovered lines:109 +Coverable lines:302 Total lines:1140 -Line coverage:64.6% -Branch coverage:55% +Line coverage:63.9% +Branch coverage:45.6%

Risk Hotspots

@@ -48,21 +48,21 @@

Coverage

NameCoveredUncoveredCoverableTotalLine coverageBranch coverage -FSharp.Control.Websockets107106213343250.2%
  
42.8%
  
+FSharp.Control.Websockets94102196343247.9%
  
42.1%
  
FSharp.Control.Websockets.Async26857225%
  
 
FSharp.Control.Websockets.Stream671357246.1%
  
 
-FSharp.Control.Websockets.ThreadSafeWebsocket049495720%
 
0%
 
-FSharp.Control.Websockets.ThreadSafeWebSocket43105357281.1%
  
57.1%
  
+FSharp.Control.Websockets.ThreadSafeWebsocket049495720%
 
0%
 
+FSharp.Control.Websockets.ThreadSafeWebSocket3153657286.1%
  
80%
  
FSharp.Control.Websockets.Websocket034345720%
 
0%
 
-FSharp.Control.Websockets.WebSocket56056572100%
 
83.3%
  
+FSharp.Control.Websockets.WebSocket5515657298.2%
  
66.6%
  
System.AssemblyVersionInformation0000
 
 
-FSharp.Control.Websockets.TPL11214126170488.8%
  
83.3%
  
+FSharp.Control.Websockets.TPL997106170493.3%
  
62.5%
  
FSharp.Control.Websockets.TPL.Stream61756885.7%
  
 
-FSharp.Control.Websockets.TPL.ThreadSafeWebSocket49126156880.3%
  
75%
  
-FSharp.Control.Websockets.TPL.WebSocket5715856898.2%
  
90%
  
+FSharp.Control.Websockets.TPL.ThreadSafeWebSocket4634956893.8%
  
 
+FSharp.Control.Websockets.TPL.WebSocket4735056894%
  
62.5%
  
System.AssemblyVersionInformation0000
 
 
-
+ \ No newline at end of file diff --git a/src/FSharp.Control.Websockets.TPL/AssemblyInfo.fs b/src/FSharp.Control.Websockets.TPL/AssemblyInfo.fs index 8b951fa..6d22e2f 100644 --- a/src/FSharp.Control.Websockets.TPL/AssemblyInfo.fs +++ b/src/FSharp.Control.Websockets.TPL/AssemblyInfo.fs @@ -4,20 +4,20 @@ open System.Reflection [] [] -[] -[] -[] -[] +[] +[] +[] +[] [] -[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Control.Websockets.TPL" let [] AssemblyProduct = "FSharp.Control.Websockets" - let [] AssemblyVersion = "0.2.1" - let [] AssemblyMetadata_ReleaseDate = "2019-09-12T00:00:00.0000000" - let [] AssemblyFileVersion = "0.2.1" - let [] AssemblyInformationalVersion = "0.2.1" + let [] AssemblyVersion = "0.2.2" + let [] AssemblyMetadata_ReleaseDate = "2019-10-02T00:00:00.0000000" + let [] AssemblyFileVersion = "0.2.2" + let [] AssemblyInformationalVersion = "0.2.2" let [] AssemblyMetadata_ReleaseChannel = "release" - let [] AssemblyMetadata_GitHash = "186b75184ac273222f755dcea59bd7680d8be72d" + let [] AssemblyMetadata_GitHash = "38dcaf681a4c15bd3b76b1f679647b688564c26d" diff --git a/src/FSharp.Control.Websockets/AssemblyInfo.fs b/src/FSharp.Control.Websockets/AssemblyInfo.fs index 34cd41f..938e9ac 100644 --- a/src/FSharp.Control.Websockets/AssemblyInfo.fs +++ b/src/FSharp.Control.Websockets/AssemblyInfo.fs @@ -4,20 +4,20 @@ open System.Reflection [] [] -[] -[] -[] -[] +[] +[] +[] +[] [] -[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Control.Websockets" let [] AssemblyProduct = "FSharp.Control.Websockets" - let [] AssemblyVersion = "0.2.1" - let [] AssemblyMetadata_ReleaseDate = "2019-09-12T00:00:00.0000000" - let [] AssemblyFileVersion = "0.2.1" - let [] AssemblyInformationalVersion = "0.2.1" + let [] AssemblyVersion = "0.2.2" + let [] AssemblyMetadata_ReleaseDate = "2019-10-02T00:00:00.0000000" + let [] AssemblyFileVersion = "0.2.2" + let [] AssemblyInformationalVersion = "0.2.2" let [] AssemblyMetadata_ReleaseChannel = "release" - let [] AssemblyMetadata_GitHash = "186b75184ac273222f755dcea59bd7680d8be72d" + let [] AssemblyMetadata_GitHash = "38dcaf681a4c15bd3b76b1f679647b688564c26d" diff --git a/tests/FSharp.Control.Websockets.TPL.Tests/AssemblyInfo.fs b/tests/FSharp.Control.Websockets.TPL.Tests/AssemblyInfo.fs index 0a4b541..9781f20 100644 --- a/tests/FSharp.Control.Websockets.TPL.Tests/AssemblyInfo.fs +++ b/tests/FSharp.Control.Websockets.TPL.Tests/AssemblyInfo.fs @@ -4,20 +4,20 @@ open System.Reflection [] [] -[] -[] -[] -[] +[] +[] +[] +[] [] -[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Control.Websockets.TPL.Tests" let [] AssemblyProduct = "FSharp.Control.Websockets" - let [] AssemblyVersion = "0.2.1" - let [] AssemblyMetadata_ReleaseDate = "2019-09-12T00:00:00.0000000" - let [] AssemblyFileVersion = "0.2.1" - let [] AssemblyInformationalVersion = "0.2.1" + let [] AssemblyVersion = "0.2.2" + let [] AssemblyMetadata_ReleaseDate = "2019-10-02T00:00:00.0000000" + let [] AssemblyFileVersion = "0.2.2" + let [] AssemblyInformationalVersion = "0.2.2" let [] AssemblyMetadata_ReleaseChannel = "release" - let [] AssemblyMetadata_GitHash = "186b75184ac273222f755dcea59bd7680d8be72d" + let [] AssemblyMetadata_GitHash = "38dcaf681a4c15bd3b76b1f679647b688564c26d" diff --git a/tests/FSharp.Control.Websockets.Tests/AssemblyInfo.fs b/tests/FSharp.Control.Websockets.Tests/AssemblyInfo.fs index bc3fe28..97cd8e9 100644 --- a/tests/FSharp.Control.Websockets.Tests/AssemblyInfo.fs +++ b/tests/FSharp.Control.Websockets.Tests/AssemblyInfo.fs @@ -4,20 +4,20 @@ open System.Reflection [] [] -[] -[] -[] -[] +[] +[] +[] +[] [] -[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Control.Websockets.Tests" let [] AssemblyProduct = "FSharp.Control.Websockets" - let [] AssemblyVersion = "0.2.1" - let [] AssemblyMetadata_ReleaseDate = "2019-09-12T00:00:00.0000000" - let [] AssemblyFileVersion = "0.2.1" - let [] AssemblyInformationalVersion = "0.2.1" + let [] AssemblyVersion = "0.2.2" + let [] AssemblyMetadata_ReleaseDate = "2019-10-02T00:00:00.0000000" + let [] AssemblyFileVersion = "0.2.2" + let [] AssemblyInformationalVersion = "0.2.2" let [] AssemblyMetadata_ReleaseChannel = "release" - let [] AssemblyMetadata_GitHash = "186b75184ac273222f755dcea59bd7680d8be72d" + let [] AssemblyMetadata_GitHash = "38dcaf681a4c15bd3b76b1f679647b688564c26d"