Package javaforce.voip
Class RTSPServer
java.lang.Object
javaforce.voip.RTSP
javaforce.voip.RTSPServer
- All Implemented Interfaces:
STUN.Listener,RTSPInterface,TransportInterface
Handles the server end of a RTSP link.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetlocalRTPhost(RTSPSession sess) Returns local RTP IP address.String[]booleaninit(int localport, RTSPServerInterface iface, TransportType type) Initialize this instance for RTSP.static booleanDetermine if server is on a local private network.voidvoidonDisconnect(RTSP rtsp, String remoteip, int remoteport) voidProcesses RTSP messages sent from clients.booleanreply(RTSPSession sess, int reply, String msg) Issues a reply to the RTSP client.booleanreply(RTSPSession sess, int code, String msg, String header) Issues a reply to the RTSP client.static voidsetNAT(RTSPServer.NAT nat, String host, String user, String pass) Sets the type of NAT traversal type (global setting).voidstunPublicIP(STUN stun, String ip, int port) voidvoidvoidvoidturnFailed(STUN stun) voidturnRefresh(STUN stun, int lifetime) voiduninit()Free all resources.static voiduseNATOnPrivateNetwork(boolean state) Disable/enable use of NAT traversal on private networks (global setting) Private networks : 192.168.x.x , 10.x.x.x , 172.[16-31].x.xMethods inherited from class javaforce.voip.RTSP
addCodec, buildsdp, delCodec, generatetag, getAuthResponse, getbranch, getbranch, getcallid, getCodec, getcseq, getcseqcmd, getFlag2, getnonce, getNow, geto, getPacketPoolSize, getremote_audio_rtp_port, getremote_video_rtp_port, getremotertphost, getRequest, getResponse, getResponseType, getrinstance, getroutelist, getSDP, gettag, gettupleid, geturi, getURI, getvialist, hasCodec, init, ishold, join, onConnect, onDisconnect, removetag, resolve, send, setFlag2, setLog
-
Field Details
-
userobj
-
expires
public int expires
-
-
Constructor Details
-
RTSPServer
public RTSPServer()
-
-
Method Details
-
init
Initialize this instance for RTSP.- Parameters:
localport- is the TCP port to bind to locally (usually 554).iface- must be a RTSPServerInterface where RTSP events are dispatched to.
-
uninit
public void uninit()Free all resources. -
setNAT
Sets the type of NAT traversal type (global setting). -
useNATOnPrivateNetwork
public static void useNATOnPrivateNetwork(boolean state) Disable/enable use of NAT traversal on private networks (global setting) Private networks : 192.168.x.x , 10.x.x.x , 172.[16-31].x.x -
isPrivateNetwork
Determine if server is on a local private network. -
getlocalRTPhost
Returns local RTP IP address.- Specified by:
getlocalRTPhostin classRTSP
-
stunPublicIP
- Specified by:
stunPublicIPin interfaceSTUN.Listener
-
turnAlloc
- Specified by:
turnAllocin interfaceSTUN.Listener
-
turnBind
- Specified by:
turnBindin interfaceSTUN.Listener
-
turnRefresh
- Specified by:
turnRefreshin interfaceSTUN.Listener
-
turnFailed
- Specified by:
turnFailedin interfaceSTUN.Listener
-
turnData
- Specified by:
turnDatain interfaceSTUN.Listener
-
reply
Issues a reply to the RTSP client. -
reply
Issues a reply to the RTSP client. -
getSessions
-
getTransportClients
-
onPacket
Processes RTSP messages sent from clients.- Specified by:
onPacketin interfaceRTSPInterface
-
onConnect
- Specified by:
onConnectin interfaceRTSPInterface
-
onDisconnect
- Specified by:
onDisconnectin interfaceRTSPInterface
-