Search the Community
Showing results for tags 'network communication'.
Found 1 result
My OOP naivety shows again, but oh well, I'll learn, albeit slowly. I have a "network connection" base class and from it I have some child classes. I want to create a public method to check if a connection is valid. It seems like this is a method that should somehow go in the base class because it will be the same for all classes (check a connection refnum whether it's tcp,udp, etc, and see if it's valid). But, I am not sure how to best accomplish getting the connection refnum which is held in the child class, into the base class. I obviously don't want some sort of public accessor to call to return the refnum to be passed to the base classes method because I don't want the connection refnum available outside the class. But, I was trying to avoid having a "is connection valid" method in every single class also, when it seems a generic method would work fine. Suggestions?