Link to home
Start Free TrialLog in
Avatar of smotbd
smotbd

asked on

500: UDP theoretical question

Hi all,

I have heard that UDP is conectionless and that a connection is only made when sending data.
However, is it actually possible to create a connection with an UDP socket and hold that connection even if no data is to be sent for a little while i.e connect, wait few seconds then send data....?
The reason I ask is: I want PC1 to connect to PC2 and then after a few seconds, have PC2 to stream video to PC1.
Problem is: I can't make PC1 connect to PC2 straight off since PC2 has a non-routable ip address. With TCP, this is simple to achieve- make tcp socket connection from PC2 to PC1 then send data from PC2 to PC1. BUT can it be implemented with UDP????


Also, can a TCP client connect to UDP or does e.g to have a tcp connection then you need tcp socket on server side and client side?

Many thanks
ASKER CERTIFIED SOLUTION
Avatar of masnrock
masnrock
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
One other major thing.... there's not going to necessarily be an exact timeframe that you'll be able to pull off because of normal things over the internet.

If you ever look into how data flows in TCP/IP and compare it against UDP, you'll actually find it not to be very feasible to try to do that with UDP since you'd have to write a program that would keep track of all of this... it's almost like trying to reinvent TCP/IP.