bugCERTI - Bugs: bug #24545, Implement a clean polymorphic...

 
 

bug #24545: Implement a clean polymorphic Socket subclasses usage

Submitted by:  Eric NOULARD <erk>
Submitted on:  Mon 13 Oct 2008 10:10:49 AM UTC  
 
Category: CERTISeverity: 3 - Normal
Item Group: Software errorStatus: In Progress
Privacy: PublicAssigned to: Eric NOULARD <erk>
Open/Closed: OpenRelease: CVS
Reproducibility: Every TimeFixed Release: Unknown

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 13 Oct 2008 11:04:54 AM UTC, comment #1:

If designing a long-term solution, it would be fine to enable "dynamic stacking", e.g.

  • TCP
  • TCP - HTTP
  • TCP - SSL
  • TCP - SSL - HTTP (i.e. HTTPS)
  • ...

A possible solution for that may be to have a polymorphic "socketLayer", that may either call system functions (being a physical layer), or that may be initialized using a pointer to lower layer.

Something like:
tcp = new SocketTCP()
tunnel = new SocketHTTPTunnel(tcp)
to build HTTP, or
tcp = new SocketTCP()
ssl = new SocketSSL(tcp)
tunnel = new SocketHTTPTunnel(ssl)
to build HTTPS

Petr Gotthard <gotthardp>
Project Member
Mon 13 Oct 2008 10:10:49 AM UTC, original submission:

We have several Socket classes:

SocketTCP
SocketUDP
SecureTCPSocket
SocketHTTPProxy

those classes all inherit from Socket abstract base class
which is fine.
However they should be used polymorphically.
Current code (mostly coming from SecureTCPSocket)
is not "polymorphically" clean.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gotthardp (Posted a comment)
  • -unavailable- added by gotthardp
  • -unavailable- added by erk (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 13 Oct 2008 11:04:54 AM UTCgotthardpCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1