Skip to content
  • Daniel P. Berrangé's avatar
    275e0d61
    ui: refactor code for populating SocketAddress from vnc_display_open · 275e0d61
    Daniel P. Berrangé authored
    
    
    The code which interprets the CLI args to populate the SocketAddress
    objects for plain & websockets VNC is quite complex already and will
    need further enhancements shortly. Refactor it into separate methods
    to avoid vnc_display_open getting even larger. As a side effect of
    the refactoring, it is now possible to specify a listen address for
    the websocket server explicitly. e.g,
    
      -vnc localhost:5900,websockets=0.0.0.0:8080
    
    will listen on localhost for the plain VNC server, but expose the
    websockets VNC server on the public interface. This refactoring
    also removes the restriction that prevents enabling websockets
    when the plain VNC server is listening on a UNIX socket.
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Message-id: 20170203120649.15637-5-berrange@redhat.com
    
    [ kraxel: squashed clang build fix ]
    
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    275e0d61
    ui: refactor code for populating SocketAddress from vnc_display_open
    Daniel P. Berrangé authored
    
    
    The code which interprets the CLI args to populate the SocketAddress
    objects for plain & websockets VNC is quite complex already and will
    need further enhancements shortly. Refactor it into separate methods
    to avoid vnc_display_open getting even larger. As a side effect of
    the refactoring, it is now possible to specify a listen address for
    the websocket server explicitly. e.g,
    
      -vnc localhost:5900,websockets=0.0.0.0:8080
    
    will listen on localhost for the plain VNC server, but expose the
    websockets VNC server on the public interface. This refactoring
    also removes the restriction that prevents enabling websockets
    when the plain VNC server is listening on a UNIX socket.
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Message-id: 20170203120649.15637-5-berrange@redhat.com
    
    [ kraxel: squashed clang build fix ]
    
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Loading