[Live-devel] where to set the IP TOS field

Ross Finlayson finlayson at live555.com
Mon Nov 7 15:07:39 PST 2016


> In order to get better performance over WIFI when doing RTP over TCP interleaved, I am setting the IP TOS field to "expedited forwarding" and I am doing that in the following function:
> 
> GenericMediaServer::incomingConnectionHandlerOnSocket
> 
> But this changes the live555 library itself. Is there any other way to do this without having to change the live555 library itself?

What I would do is subclass “RTSPServer”, and - in your subclass - reimplement the “createNewClientConnection()” virtual function, as follows:

ClientConnection* myRTSPServerSubclass::createNewClientConnection(int clientSocket, struct sockaddr_in clientAddr) {
	// Do whatever you need to do to set the IP TOS field (for “clientSocket”).

	return RTSPServer::createNewClientConnection(clientSocket, clientAddr);
}


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list