Enable Parameters on TSSRT listener
This commit is contained in:
parent
1c6a483e49
commit
0430a644df
4 changed files with 9 additions and 7 deletions
|
@ -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");
|
||||
|
|
|
@ -97,7 +97,7 @@ namespace Socket{
|
|||
public:
|
||||
SRTServer();
|
||||
SRTServer(int existingSock);
|
||||
SRTServer(int port, std::string hostname, bool nonblock = false, const std::string &_direction = "input");
|
||||
SRTServer(int port, std::string hostname, std::map<std::string, std::string> params, bool nonblock = false, const std::string &_direction = "input");
|
||||
SRTConnection accept(bool nonblock = false, const std::string &direction = "input");
|
||||
void setBlocking(bool blocking);
|
||||
bool connected() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue