Skip to content

Commit

Permalink
Make SocketMiddleware public again
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof-Cieslak committed Apr 27, 2020
1 parent 6de20fc commit 4e22586
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Saturn/Channels.fs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module Channels =
abstract member SendMessageToClient: ChannelPath -> SocketId -> Topic -> 'a -> Task<unit>

/// A type that wraps access to connected websockets by endpoint
type internal SocketHub(serializer: IJsonSerializer) =
type SocketHub(serializer: IJsonSerializer) =
let sockets = Dictionary<ChannelPath, ConcurrentDictionary<SocketId, Socket.ThreadSafeWebSocket>>()

let sendMessage (msg: 'a Message) (socket: Socket.ThreadSafeWebSocket) = task {
Expand Down Expand Up @@ -95,7 +95,7 @@ module Channels =
| _ -> ()
}

type internal SocketMiddleware(next : RequestDelegate, serializer: IJsonSerializer, path: string, channel: IChannel, sockets: SocketHub, logger: ILogger<SocketMiddleware>) =
type SocketMiddleware(next : RequestDelegate, serializer: IJsonSerializer, path: string, channel: IChannel, sockets: SocketHub, logger: ILogger<SocketMiddleware>) =
do sockets.NewPath path

member __.Invoke(ctx : HttpContext) =
Expand Down

0 comments on commit 4e22586

Please sign in to comment.