Click here to Skip to main content
14,933,981 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Copy the data in List control using ctrl+C Pin
shir_k6-Sep-07 2:27
Membershir_k6-Sep-07 2:27 
GeneralRe: Copy the data in List control using ctrl+C Pin
David Crow6-Sep-07 3:19
MemberDavid Crow6-Sep-07 3:19 
GeneralRe: Copy the data in List control using ctrl+C Pin
ThatsAlok6-Sep-07 5:02
MemberThatsAlok6-Sep-07 5:02 
GeneralRe: Copy the data in List control using ctrl+C [modified] Pin
shir_k8-Sep-07 19:52
Membershir_k8-Sep-07 19:52 
QuestionUDP Server Pin
Andy2025-Sep-07 23:01
MemberAndy2025-Sep-07 23:01 
QuestionRe: UDP Server Pin
Mark Salsbery6-Sep-07 5:51
MemberMark Salsbery6-Sep-07 5:51 
AnswerRe: UDP Server Pin
Andy2026-Sep-07 10:58
MemberAndy2026-Sep-07 10:58 
GeneralRe: UDP Server Pin
Mark Salsbery6-Sep-07 11:33
MemberMark Salsbery6-Sep-07 11:33 
Andy202 wrote:
If I comment out the receive I get error 10057 on the send.

The error is WSAENOTCONN.
That's expected since you're using the "from" address from the recvfrom(),
which isn't going to be a valid address without a successful recvfrom() call.

Andy202 wrote:
I would like my UDP server to send the data when the client connects;

UDP is connectionless so you don't know if a client is connected or not.

It sounds like you need to either...

1) Keep track of clients that are listening - that would mean a client has to send a notification to
the server when it's ready to receive datagrams.  The server can store a list of "connected" clients and
send the periodic datagrams to every address on the list.

2) Broadcast the periodic datagrams.  Set the socket option SO_BROADCAST on the socket and send
to the broadcast address (INADDR_BROADCAST).  The clients need to set the SO_BROADCAST socket option
as well. 

Mark








Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: UDP Server Pin
Andy2027-Sep-07 4:48
MemberAndy2027-Sep-07 4:48 
GeneralRe: UDP Server Pin
Mark Salsbery7-Sep-07 5:22
MemberMark Salsbery7-Sep-07 5:22 
GeneralRe: UDP Server Pin
Andy2027-Sep-07 9:13
MemberAndy2027-Sep-07 9:13 
GeneralRe: UDP Server Pin
Moak8-Nov-07 12:37
MemberMoak8-Nov-07 12:37 
Questionhow to establish usb communication in MFC? Pin
ashokbngr5-Sep-07 22:43
Memberashokbngr5-Sep-07 22:43 
AnswerRe: how to establish usb communication in MFC? Pin
Cedric Moonen5-Sep-07 23:16
MemberCedric Moonen5-Sep-07 23:16 
Questionnumerical methods Pin
mitsui585-Sep-07 22:00
Membermitsui585-Sep-07 22:00 
AnswerRe: numerical methods Pin
Russell'5-Sep-07 22:39
MemberRussell'5-Sep-07 22:39 
GeneralRe: numerical methods Pin
mitsui585-Sep-07 22:53
Membermitsui585-Sep-07 22:53 
GeneralRe: numerical methods Pin
Russell'5-Sep-07 23:13
MemberRussell'5-Sep-07 23:13 
GeneralRe: numerical methods Pin
mitsui587-Sep-07 4:35
Membermitsui587-Sep-07 4:35 
AnswerRe: numerical methods Pin
David Crow6-Sep-07 3:28
MemberDavid Crow6-Sep-07 3:28 
AnswerRe: numerical methods Pin
ollydbg239-Sep-07 1:05
Memberollydbg239-Sep-07 1:05 
QuestionHow can I monitor the cts pin of serial port using dcb Pin
yaminisridaran5-Sep-07 20:06
Memberyaminisridaran5-Sep-07 20:06 
AnswerRe: How can I monitor the cts pin of serial port using dcb Pin
chandu0045-Sep-07 20:26
Memberchandu0045-Sep-07 20:26 
GeneralRe: How can I monitor the cts pin of serial port using dcb Pin
yaminisridaran5-Sep-07 20:30
Memberyaminisridaran5-Sep-07 20:30 
GeneralRe: How can I monitor the cts pin of serial port using dcb Pin
chandu0045-Sep-07 20:51
Memberchandu0045-Sep-07 20:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.