bytedeco/javacv

Is there some method to distinguish network error or server reject error

Open

#1,970 创建于 2023年1月16日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Java (1,583 fork)batch import
enhancementhelp wanted

仓库指标

Star
 (6,985 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Hi, I'm using ffmpegrecorder to make rtmp push , when something wrong, I can get error message from start/record method, because I want to do more retry times to half an hour when network is error, and only 10 seconds when server reject. Is there some method can I get the error reason?

I got the error message from exception, include the socket error -32/-104/-110/... error code, As I know: -110/-111 means connect failed/ read/write timeout.
-104 is reset by server other code I'm not sure.

but the code, I can't get it easily, must parse from the exception string.

Is there some advice about my propose? thank you !

贡献者指南