Skip to content
Snippets Groups Projects
  • Andy Green's avatar
    a4148a13
    refactor-eliminate-lws-union · a4148a13
    Andy Green authored
    The union used to make a lot of sense to save space between
    mutually exclusive modes.  But the fact the http2 struct
    contains the http1 struct as well as it appearing in the
    union means the http1 struct belongs outside the union.
    
    This patch
    
     - eliminates the union
     - puts the http_related struct directly in struct lws
     - removes http_related from h2
     - puts h2 directly in struct lws if enabled for build
     - changes ws to be a pointer, allocated if we upgrade to ws
       (the ws part contains a 135 byte char array for ping / close)
    
    
    Again all of this is entirely private / internal and doesn't affect
    any apis.
    a4148a13
    History
    refactor-eliminate-lws-union
    Andy Green authored
    The union used to make a lot of sense to save space between
    mutually exclusive modes.  But the fact the http2 struct
    contains the http1 struct as well as it appearing in the
    union means the http1 struct belongs outside the union.
    
    This patch
    
     - eliminates the union
     - puts the http_related struct directly in struct lws
     - removes http_related from h2
     - puts h2 directly in struct lws if enabled for build
     - changes ws to be a pointer, allocated if we upgrade to ws
       (the ws part contains a 135 byte char array for ping / close)
    
    
    Again all of this is entirely private / internal and doesn't affect
    any apis.