简体   繁体   English

rtsp客户端不应答服务器

[英]rtsp client dont answer to server

I'm writing a RTSP server. 我正在编写RTSP服务器。 When I wait for header from client my server receives: 当我等待来自客户端的标头时,服务器会收到:

OPTIONS rtsp://192.168.1.147:55555 RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.0.1 (LIVE555 Streaming Media v2011.12.23)

readLine() in this place returns null. 这里的readLine()返回null。 then I'm sending : 然后我发送:

bw.write("RTSP/1.0 200 OK" + CRLF);
bw.write("Supported: play.basic, con.persistent");
bw.write("CSeq: " + RTSPSeqNb + CRLF);
bw.write("Session: " + RTSP_ID + CRLF);
bw.write("Public: SETUP, PLAY, TEARDOWN" + CRLF+CRLF);
bw.flush();

Where CRLF = "\\r\\n" But there is no any response. 其中CRLF =“ \\ r \\ n”但是没有任何响应。 My question: WHY? 我的问题:为什么?

Did you forget to append CRLF to the second line before CSeq ? 您是否忘记将CRLF附加到CSeq之前的第二行? Then lots of networking "why" questions could be answered with wireshark . 然后, wireshark可以回答很多网络“为什么”的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM