Do TCP/IP and UDP not mix?
I'm trying to write a game that uses UDP networking, but for some messages I wanted to use TCP/IP to make sure they got there. So I had a datagram socket on one port and a tcpip socket on another port. This yeilded pretty poor results. 30% of the time the game would run fine, 50% of the time it would fail to connect the TCP/IP socket, 20% of the time it would crash windows and reset my computer. What I would like to know is:
Have I learnt a valuable lesson here about not mixing protocols? Have I been misusing the mixture of protocols? or have I just created some kind of frankenstein code and shouldn't be surprised when all it does is lurch around, moan and attempt to kill me?
# 1
> Have I learnt a valuable lesson here about not mixing
> protocols?
They do mix - you can even use the same port number since tcp ports are orthogonal to udp ports.
> Have I been misusing the mixture of
> protocols?
Without seen code it is very difficult to say.
> or have I just created some kind of
> frankenstein code
Sounds like it!
> and shouldn't be surprised when all
> it does is lurch around, moan and attempt to kill me?
# 2
>This
> yeilded pretty poor results.
I'm kind of impressed you got the results you did.
> Have I learnt a valuable lesson here about not mixing
> protocols?
Yep
> Have I been misusing the mixture of
> protocols?
Yep.
> or have I just created some kind of
> frankenstein code and shouldn't be surprised when all
> it does is lurch around, moan and attempt to kill me?
Possibly.
# 4
The last sentence. At least as I understood it (and seemingly sabre also).BTW @sabre, just because your name seems to indicate a liking for such things, did you hear that one of Napolean's sabres just sold for, what, I think it was $14 million?Crazy, absolutely
# 5
> BTW @sabre, just because your name seems to indicate> a liking for such things, did you hear that one of> Napolean's sabres just sold for, what, I think it was> $14 million?It was $3 million more than I wanted to pay but it was worth it!
# 6
> > BTW @sabre, just because your name seems to
> indicate
> > a liking for such things, did you hear that one of
> > Napolean's sabres just sold for, what, I think it
> was
> > $14 million?
>
> It was $3 million more than I wanted to pay but it
> was worth it!
;-)