diff --git a/Network/Run/Core.hs b/Network/Run/Core.hs
--- a/Network/Run/Core.hs
+++ b/Network/Run/Core.hs
@@ -2,30 +2,12 @@
 {-# LANGUAGE CPP #-}
 
 module Network.Run.Core (
-    runClient
-  , resolve
+    resolve
+  , openSocket
   , openServerSocket
   ) where
 
-import qualified Control.Exception as E
-import Control.Monad (when)
 import Network.Socket
-
-runClient :: SocketType -> String -> String -> (Socket -> SockAddr -> IO a) -> IO a
-runClient socketType host port client = withSocketsDo $ do
-    addr <- resolve socketType (Just host) port False
-    let sockAddr = addrAddress addr
-#if MIN_VERSION_network(3,1,1)
-    E.bracket (open addr) (\sock -> gracefulClose sock 5000)
-                          (\sock -> client sock sockAddr)
-#else
-    E.bracket (open addr) close $ \sock -> client sock sockAddr
-#endif
-  where
-    open addr = do
-        sock <- openSocket addr
-        when (socketType == Stream) $ connect sock $ addrAddress addr
-        return sock
 
 resolve :: SocketType -> Maybe HostName -> ServiceName -> Bool -> IO AddrInfo
 resolve socketType mhost port passive =
diff --git a/Network/Run/TCP.hs b/Network/Run/TCP.hs
--- a/Network/Run/TCP.hs
+++ b/Network/Run/TCP.hs
@@ -16,9 +16,18 @@
 
 -- | Running a TCP client with a connected socket.
 runTCPClient :: String -> String -> (Socket -> IO a) -> IO a
-runTCPClient host port client = runClient Stream host port client'
+runTCPClient host port client = withSocketsDo $ do
+    addr <- resolve Stream (Just host) port False
+#if MIN_VERSION_network(3,1,1)
+    E.bracket (open addr) (\sock -> gracefulClose sock 5000) client
+#else
+    E.bracket (open addr) close client
+#endif
   where
-    client' sock _peer = client sock
+    open addr = do
+        sock <- openSocket addr
+        connect sock $ addrAddress addr
+        return sock
 
 -- | Running a TCP server with an accepted socket and its peer name.
 runTCPServer :: Maybe HostName -> ServiceName -> (Socket -> IO a) -> IO a
diff --git a/Network/Run/UDP.hs b/Network/Run/UDP.hs
--- a/Network/Run/UDP.hs
+++ b/Network/Run/UDP.hs
@@ -14,7 +14,10 @@
 --   server's socket address.
 --   They should be used with 'sendTo'.
 runUDPClient :: String -> String -> (Socket -> SockAddr -> IO a) -> IO a
-runUDPClient = runClient Datagram
+runUDPClient host port client = withSocketsDo $ do
+    addr <- resolve Datagram (Just host) port False
+    let sockAddr = addrAddress addr
+    E.bracket (openSocket addr) close $ \sock -> client sock sockAddr
 
 -- | Running a UDP server with an open socket.
 runUDPServer :: Maybe HostName -> ServiceName -> (Socket -> IO a) -> IO a
diff --git a/network-run.cabal b/network-run.cabal
--- a/network-run.cabal
+++ b/network-run.cabal
@@ -1,5 +1,5 @@
 name:                network-run
-version:             0.1.0
+version:             0.2.0
 synopsis:            Simple network runner library
 description:         Simple functions to run network clients and servers.
 -- bug-reports:
