Skip to content

Commit

Permalink
Windows-friendly names for named pipes
Browse files Browse the repository at this point in the history
  • Loading branch information
tdammers committed May 30, 2023
1 parent 5761c32 commit e9262c8
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}

module Test.Ouroboros.Network.RawBearer where

Expand Down Expand Up @@ -64,12 +65,17 @@ prop_raw_bearer_send_and_receive_inet msg =
prop_raw_bearer_send_and_receive_local :: Message -> Property
prop_raw_bearer_send_and_receive_local msg =
ioProperty $ withIOManager $ \iomgr -> do
#if defined(mingw32_HOST_OS)
let clientName = "\\\\.\\pipe\\local_socket_client.test"
let serverName = "\\\\.\\pipe\\local_socket_server.test"
#else
let clientName = "local_socket_client.test"
let serverName = "local_socket_server.test"
#endif
cleanUp clientName
cleanUp serverName
let clientAddr = LocalAddress clientName
let serverAddr = LocalAddress serverName
let clientAddr = localAddressFromPath clientName
let serverAddr = localAddressFromPath serverName
rawBearerSendAndReceive
(localSnocket iomgr)
makeLocalRawBearer
Expand Down

0 comments on commit e9262c8

Please sign in to comment.