TargetAddress Property

Summary
Gets or sets the IP address on which the RTSP Server should listen for connections.
Syntax
C#
C++/CLI
public string TargetAddress { get; set; } 
public: 
property String^ TargetAddress { 
   String^ get(); 
   void set (    String^ ); 
} 

Property Value

String containing the IP address. The address can be in the IPv4 format ("192.168.0.120") or a host address ("localhost").

Remarks

The RTSP Server will listen for RTSP clients to connect to the address specified by this function and the port passed to StartServer.

See How to Get Your Own IP Address Programmatically on how to get the IP addresses for the network adapters in your computer.

Example
C#
using Leadtools; 
using Leadtools.Multimedia; 
using LeadtoolsMultimediaExamples.Fixtures; 
 
 
RTSPServer _server = null; 
public void StartServer() 
{ 
   // create the server instance 
   _server = new RTSPServer(); 
   // specify c:\MyFiles as the source folder 
   _server.SetSourceFolder(0, @"c:\MyFiles"); 
   // will listen on 127.0.0.1 
   _server.TargetAddress = "127.0.0.1"; 
   // start listening on port 554 
   _server.StartServer(554); 
   // set the latency 
   _server.SetLiveLatency(-1, 0.7); 
} 
 
public void StopServer() 
{ 
   _server.StopServer(554); 
   _server.Dispose(); 
   _server = null; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Multimedia Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.