|
HI
Does your app only communicate with one
client?
Yes, its based on a peer to peer idea.
I've been using the term server more or less to mean the application that starts
by listening for incoming UDP data.
After that client hangs up, will another
client connect?
Yes another client may connect, depending
if user wants to.
//-------------------------
It creates a socket and sends data to
the server addr/port. Look at the ::bind( ) Remarks in help.
You'll note that only for tcp if the port is specified as 0 that windows
will assign the port number. You see, in udp this just isn't
necessary. In tcp you can only have one app receiving and sending
data on a particular port. But with udp you can have several apps
all receiving data on the same port, and yes it's a pain to be avoided but
is possible (at least you can do it in UNIX). So I think for the
bind call in udp you have to specify the port even for the
client.
So you think I have to call the bind call
on the client as well as the server and specify the port I think it should
use?? This may well be correct. When I bind the client side to a
port no the program works, its just coincidence that it is the same port no
as the server.
If it's working, why not just use it that
way?
That's what I'm going to do. Its Just that
I thought that it was some standard or something to have Windows allocate the
port that the sending app would use and wanted to know more about this area of
UDP.
Yeah, pretty much - just the odd niggle
that's been bugging me - such as the bind thing.....
I would do the bind but not the connect.
Even with what that author wrote, the connect just "locks" you down to talking
only to one IP/port and it's not necessary and doesn't really "connect" you at
all.
Thanks for your advice on this /dev. Since
the project works in terms of sending VoIP data across a UDP connection I think
I will leave it alone. Now I've only got to figure out how to detect when
the line is dropped....
Regards
Max
|
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 266.3.0 - Release Date: Mon 21/02/2005
_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for
subscription changes, and list archive.