Skip to content

Conversation

@varunverlencar
Copy link

Add TCP port socket shutdown if not alive

Public API Changes

Add shutdown handler for clients /shutdown

Description

  1. Added changes for shutdown handler and api
  2. Added readme usage instructions
  3. tested on local javascipt UI

#193

@varunverlencar varunverlencar force-pushed the feat/issue-193-add-shudown-client-handle branch from 241cad5 to 07fcdd9 Compare November 14, 2025 02:05
@varunverlencar varunverlencar changed the title issue-193: add shutdown handler for client to call and close alive so… issue-193: add shutdown handler for client to call and close alive sockets Nov 14, 2025
@varunverlencar
Copy link
Author

varunverlencar commented Nov 14, 2025

tested with ros2 run image_tools cam2image --ros-args -p frequency:=30.0 -p width:=640 -p height:=480 -p burger_mode:=true
and custom UI that listens on web_video_server: you can also use web-browser http://localhost:8080/shutdown?topic=/image
output:

[INFO] [web_video_server-1]: process started with pid [246966]
[web_video_server-1] [INFO] [1763087236.891895946] [web_video_server]: Waiting For connections on 0.0.0.0:8080
[web_video_server-1] [INFO] [1763087282.546730930] [web_video_server]: Handling Request: /stream?topic=/image
[web_video_server-1] [INFO] [1763087282.547466223] [web_video_server]: Streaming topic /image with QoS profile default
[web_video_server-1] [INFO] [1763087290.387515416] [web_video_server]: Handling Request: /shutdown
[web_video_server-1] [INFO] [1763087290.387721288] [web_video_server]: Shutdown request removed 1 stream(s) for topic <all>
[web_video_server-1] [INFO] [1763087290.388883366] [web_video_server]: Handling Request: /shutdown
[web_video_server-1] [INFO] [1763087290.388922029] [web_video_server]: Shutdown request removed 0 stream(s) for topic <all>
[web_video_server-1] [INFO] [1763087290.393034420] [web_video_server]: Removed Stream: /image
[web_video_server-1] [INFO] [1763087296.019929017] [web_video_server]: Handling Request: /stream?topic=/image
[web_video_server-1] [INFO] [1763087296.020282519] [web_video_server]: Streaming topic /image with QoS profile default
[web_video_server-1] [INFO] [1763087299.776973402] [web_video_server]: Handling Request: /shutdown
[web_video_server-1] [INFO] [1763087299.777058013] [web_video_server]: Shutdown request removed 1 stream(s) for topic <all>
[web_video_server-1] [INFO] [1763087299.778284809] [web_video_server]: Handling Request: /shutdown
[web_video_server-1] [INFO] [1763087299.778319854] [web_video_server]: Shutdown request removed 0 stream(s) for topic <all>
[web_video_server-1] [INFO] [1763087299.892136295] [web_video_server]: Removed Stream: /image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants