Skip to content

Commit

Permalink
resolve more conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ggreif committed Jun 14, 2016
1 parent a4d050b commit 046d140
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Network.hs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ listenOn (Service serv) = do
(\sock -> do
port <- getServicePortNumber serv
setSocketOption sock ReuseAddr 1
bindSocket sock (SockAddrInet port iNADDR_ANY)
bind sock (SockAddrInet port iNADDR_ANY)
listen sock maxListenQueue
return sock
)
Expand All @@ -208,7 +208,7 @@ listenOn (PortNumber port) = do
(sClose)
(\sock -> do
setSocketOption sock ReuseAddr 1
bindSocket sock (SockAddrInet port iNADDR_ANY)
bind sock (SockAddrInet port iNADDR_ANY)
listen sock maxListenQueue
return sock
)
Expand All @@ -221,7 +221,7 @@ listenOn (UnixSocket path) =
(sClose)
(\sock -> do
setSocketOption sock ReuseAddr 1
bindSocket sock (SockAddrUnix path)
bind sock (SockAddrUnix path)
listen sock maxListenQueue
return sock
)
Expand All @@ -248,7 +248,7 @@ listen' serv = do
(sClose)
(\sock -> do
setSocketOption sock ReuseAddr 1
bindSocket sock (addrAddress addr)
bind sock (addrAddress addr)
listen sock maxListenQueue
return sock
)
Expand Down
2 changes: 1 addition & 1 deletion Network/Socket/ByteString.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ withIOVec cs f =
-- > Nothing (Just "3000")
-- > let serveraddr = head addrinfos
-- > sock <- socket (addrFamily serveraddr) Stream defaultProtocol
-- > bindSocket sock (addrAddress serveraddr)
-- > bind sock (addrAddress serveraddr)
-- > listen sock 1
-- > (conn, _) <- accept sock
-- > talk conn
Expand Down
2 changes: 1 addition & 1 deletion examples/EchoServer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ main = withSocketsDo $
Nothing (Just "3000")
let serveraddr = head addrinfos
sock <- socket (addrFamily serveraddr) Stream defaultProtocol
bindSocket sock (addrAddress serveraddr)
bind sock (addrAddress serveraddr)
listen sock 1
(conn, _) <- accept sock
talk conn
Expand Down
8 changes: 4 additions & 4 deletions tests/Simple.hs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ testGetPeerCred =
serverSetup = do
sock <- socket AF_UNIX Stream defaultProtocol
bindSocket sock $ SockAddrUnix addr
bind sock $ SockAddrUnix addr
listen sock 1
return sock
Expand Down Expand Up @@ -183,7 +183,7 @@ testGetPeerEid =
serverSetup = do
sock <- socket AF_UNIX Stream defaultProtocol
bindSocket sock $ SockAddrUnix addr
bind sock $ SockAddrUnix addr
listen sock 1
return sock
Expand Down Expand Up @@ -294,7 +294,7 @@ tcpTest clientAct serverAct = do
sock <- socket AF_INET Stream defaultProtocol
setSocketOption sock ReuseAddr 1
addr <- inet_addr serverAddr
bindSocket sock (SockAddrInet aNY_PORT addr)
bind sock (SockAddrInet aNY_PORT addr)
listen sock 1
serverPort <- socketPort sock
putMVar portVar serverPort
Expand Down Expand Up @@ -322,7 +322,7 @@ udpTest clientAct serverAct = do
sock <- socket AF_INET Datagram defaultProtocol
setSocketOption sock ReuseAddr 1
addr <- inet_addr serverAddr
bindSocket sock (SockAddrInet aNY_PORT addr)
bind sock (SockAddrInet aNY_PORT addr)
serverPort <- socketPort sock
putMVar portVar serverPort
return sock
Expand Down

0 comments on commit 046d140

Please sign in to comment.