Websockets are a natively supported way for a server communicating with a player in Minecraft. The official Script API of Minecraft however is generally preferred over using a websocket connection.
This repository contains a Python-based solution for real-time video processing using WebSockets. It enables you to stream video from an RTSP source or a video file, process each frame on the server, ...