Re: client-server network
- From: "Michael K. O'Neill" <MikeAThon2000@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Dec 2006 08:58:42 -0800
"meenu" <mnair.lekshmi@xxxxxxxxx> wrote in message
news:1166180930.624776.125850@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have created a server and a client to implement a client-server
network using UDP (technique of broadcast) ......client will first send
the msg using sendto..then waits for a reply from the server using
recvfrom...server received the data that the client sent.But the data
sent by server didn't reach the client......
Please find the attached files............
There's alot wrong with this code (and your question is unrelated to MFC).
Look under the "Broadcast" section of "Beej's Guide to Network Programming"
at http://beej.us/guide/bgnet/ . It's written for Unix/Linux, but it's easy
to see how to use with winsock.
Note that for broadcast, you must set the SO_BROADCAST option, which your
code does not now do.
Note to Joseph Newcomer: UDP might not be better than TCP, but it's the only
way to get broadcast capability, which is what the OP wants. And the option
he needs is SO_BROADCAST, not SO_REUSEADDR
Mike
.
- Follow-Ups:
- Re: client-server network
- From: Joseph M . Newcomer
- Re: client-server network
- References:
- client-server network
- From: meenu
- client-server network
- Prev by Date: Re: /GS compile option
- Next by Date: Re: How to create a FileOpenDialog with preview(picture)
- Previous by thread: Re: client-server network
- Next by thread: Re: client-server network
- Index(es):
Relevant Pages
|