isAppDataSocketConnected appData = case appRawSocket appData of 
                                        Just s -> isConnected s
                                        Nothing -> return False
isAppDataSocketConnected appData = case appRawSocket appData of 
                                        Just s -> isConnected s
                                        Nothing -> return False
isAppDataSocketConnected appData = case appRawSocket appData of 
                                        Just s -> isConnected s
                                        Nothing -> return False