Enable Parameters on TSSRT listener

This commit is contained in:
Matthew James 2022-07-22 00:44:28 +08:00 committed by Thulinma
parent 1c6a483e49
commit 0430a644df
4 changed files with 9 additions and 7 deletions

View file

@ -462,12 +462,11 @@ namespace Socket{
SRTServer::SRTServer(int fromSock){conn = SRTConnection(fromSock);}
SRTServer::SRTServer(int port, std::string hostname, bool nonblock, const std::string &_direction){
SRTServer::SRTServer(int port, std::string hostname, std::map<std::string, std::string> _params, bool nonblock, const std::string &_direction){
// We always create a server as listening
std::map<std::string, std::string> listenMode;
listenMode["mode"] = "listener";
_params["mode"] = "listener";
if (hostname == ""){hostname = "0.0.0.0";}
conn.connect(hostname, port, _direction, listenMode);
conn.connect(hostname, port, _direction, _params);
conn.setBlocking(true);
if (!conn){
ERROR_MSG("Unable to create socket");