java - Replacing hole punched/STUN UDP socket with TCP socket at runtime -


i have situation used stun establish udp [rtp] connection between 2 clients can stream media 1 packet loss. now, done streaming media , 1 client send other client large file. rather using udp [rtp] send large file, find more convenient, programmer, send file tcp because tcp takes care of re-sending lost packets on behalf. can tell client applications stop using udp connections (say "socket.close(); socket = null;") , open new tcp connections @ same port/address udp connections? work or three-way handshake blocked? there timing or security issue involved? in cases replacing hole punched udp tcp work , in cases not work?

tcp , udp ports different. tcp socket @ port 1000, different communication endpoint udp socket @ port 1000. application span new thread, establish new tcp connection , transfer desired file. udp connection can continue exchange of rtp packets.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -