Shoutcast 스트림을 수신하도록 QTcpServer를 설정합니다. newConnection() - 신호는 다음과 같이 실행됩니다.QTcpServer : 연결된 클라이언트에게 HTTP/1.0 200 OK 전송
connect(tcpServer, SIGNAL(newConnection()), this, SLOT(handleClientComm()));
void IcecastServer::handleClientComm(){
QTcpSocket *clientConnection = tcpServer->nextPendingConnection();
qDebug() << clientConnection->write("HTTP/1.0 200 OK\r\n\r\n") << endl;
clientConnection->flush();
}
HTTP 200을 보내려면 어떻게해야합니까?
감사합니다. 이제 작동하고, 줄 바꿈 사이의 공백을 제거해야했습니다. – Hedge