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

 
 

bug #24545: Implement a clean polymorphic Socket subclasses usage

Submitter:  Eric NOULARD <erk>
Submitted:  Mon 13 Oct 2008 10:10:49 AM UTC
   
 
Category:  CERTI Severity:  * 3 - Normal
Item Group:  Software error Status:  In Progress
Privacy:  Public Assigned to:  erk
Open/Closed:  Open Release:  * CVS
Reproducibility:  Every Time Fixed Release:  * Unknown
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-10-13 gotthardp Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code