Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAD-3444 snocket changes from p2p-master #3369

Merged
merged 6 commits into from
Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions ouroboros-network-framework/demo/ping-pong.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import System.Exit

import Ouroboros.Network.Socket
import Ouroboros.Network.Snocket
import qualified Ouroboros.Network.Snocket as Snocket
import Ouroboros.Network.Mux
import Ouroboros.Network.ErrorPolicy
import Ouroboros.Network.IOManager
Expand Down Expand Up @@ -107,7 +108,7 @@ clientPingPong :: Bool -> IO ()
clientPingPong pipelined =
withIOManager $ \iomgr ->
connectToNode
(localSnocket iomgr defaultLocalSocketAddrPath)
(Snocket.localSnocket iomgr)
unversionedHandshakeCodec
noTimeLimitsHandshake
(cborTermVersionDataCodec unversionedProtocolDataCodec)
Expand Down Expand Up @@ -145,7 +146,7 @@ serverPingPong =
networkState <- newNetworkMutableState
_ <- async $ cleanNetworkMutableState networkState
withServerNode
(localSnocket iomgr defaultLocalSocketAddrPath)
(Snocket.localSnocket iomgr)
nullNetworkServerTracers
networkState
(AcceptedConnectionsLimit maxBound maxBound 0)
Expand Down Expand Up @@ -203,9 +204,9 @@ demoProtocol1 pingPong pingPong' =

clientPingPong2 :: IO ()
clientPingPong2 =
withIOManager $ \iomgr ->
withIOManager $ \iomgr -> do
connectToNode
(localSnocket iomgr defaultLocalSocketAddrPath)
(Snocket.localSnocket iomgr)
unversionedHandshakeCodec
noTimeLimitsHandshake
(cborTermVersionDataCodec unversionedProtocolDataCodec)
Expand Down Expand Up @@ -256,7 +257,7 @@ serverPingPong2 =
networkState <- newNetworkMutableState
_ <- async $ cleanNetworkMutableState networkState
withServerNode
(localSnocket iomgr defaultLocalSocketAddrPath)
(Snocket.localSnocket iomgr)
nullNetworkServerTracers
networkState
(AcceptedConnectionsLimit maxBound maxBound 0)
Expand Down
Loading