Class Question

  • Thread starter Thread starter John Tear
  • Start date Start date
J

John Tear

Hi all

Quick nice and easy question for all you OOP gurus! I am looking to
design a class which inherits most of its functionality from the
socket class (what I as an old VB6 programmer would call the winsock
control).

I want to use the socket class but I also want to store information
such as when a client logged on, last packet sent and a few other
properties and methods. The application will be a server app.

My question is this:

Should I base my class on the socket class and add all the other
functionality to that i.e. logged on time, or should I create a class
based on the socket class and a second class with all the other data I
want to store? The second method means I will have to have code in
between so that when I create actual objects they can relate to each
other.

I suppose Im asking if I should add my own designs to, what is really,
a windows 'control'? *please dont correct me on ocx and classes
stuff!!!*

In VB6 I would have had an array of winsock controls and an array of
types that were related through the same arrayID.

Any help at all will be appreciated.

Thanks, (e-mail address removed)
 
Hi ,
It would certianly be easier for you to inherit from the Socket class and
add more functionality to it rather than creating a new class and then
writing code to make them interact.


Anand Balasubramanian
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks
 
Back
Top