|
HI
Yes, I defiantly want the server to listen on a
known port 4010. As for the client I don't care - Windows can allocate it
(as it should do?) as long as they can use full duplex
communication.
Ok this is my understatding of a server. It
creates a socket, binds it to a know port and then wait to recieve data.
Once it has recieved data the sAddr should be filled with the address and that
can then be used to send data back to the client with sendto?
NOTE:
I'm not sure the above is correct. I'm sure
I had an application watching the port No and doing that the sendto make the
PORT No jump from a listening port no the the same as the client???
Server
CreateSocket
PORT = 4010
Bind(PORT, IP)
SOCKADDR sAddr;
while(1)
{
recievedata( &sAddr );
}
... Another thread or something
while(1)
{
senddata( sAddr );
}
The client just creates a socket and Connects to
a known IP - Port No and sends data. One you call connect I think Window
assigns a port no to the socket so you can just call recv???
Client
CreateSocket
Connect( PORT, IP )
while(1)
{
Senddata
}
...... Another thread or something
while(1)
{
recvdata()
}
Nope - I definatly don't want TCP. This is
a streaming audio and so TCP is out. The only reason I want to set things
up with a connect is to try and make sure I only have two people talking at a
time - without anyone else sending unwanted data to that port.....
Nope defiantly UDP
I think this is pretty much what I'm confused
by... What I've written is How I think this work and not necessarily how
they do work. Any corrections welcome.
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.
