connectUDP :: String -> Int -> IO Socket
connectUDP host port = do sock <- socket AF_INET Datagram 0
                          addr <- getHostByName host
                          connect sock $ SockAddrInet (toEnum port) $ hostAddress addr
                          --socketToHandle sock ReadWriteMode
                          return sock
connectUDP :: String -> Int -> IO Socket
connectUDP host port = do sock <- socket AF_INET Datagram 0
                          addr <- getHostByName host
                          connect sock $ SockAddrInet (toEnum port) $ hostAddress addr
                          --socketToHandle sock ReadWriteMode
                          return sock
connectUDP host port = do sock <- socket AF_INET Datagram 0
                          addr <- getHostByName host
                          connect sock $ SockAddrInet (toEnum port) $ hostAddress addr
                          --socketToHandle sock ReadWriteMode
                          return sock