opens socket as binary file