Click here to Skip to main content
14,929,833 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Copy the data in List control using ctrl+C Pin
ThatsAlok5-Sep-07 23:31
MemberThatsAlok5-Sep-07 23:31 
GeneralRe: Copy the data in List control using ctrl+C Pin
shir_k6-Sep-07 1:18
Membershir_k6-Sep-07 1:18 
GeneralRe: Copy the data in List control using ctrl+C Pin
Nishad S6-Sep-07 1:38
MemberNishad S6-Sep-07 1:38 
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 
I would like my UDP server to send the data when the client connects; say at a rate of 100 msec.
But I can only get it working when the Server does a receive first (so the client has to do a send) then the Server does the send.

Can this be done? The server fails if I do not do the Receive and the client fails if I dont run the server first.

See code below:-

	while(g_bUDP_Socket_Created && g_bUDPStatus)<br />
	{<br />
		bytesRead = recvfrom (conn_socket, (char *)&RxBuffer, sizeof(RxBuffer), 0, (struct sockaddr *)&from, &length);<br />
		// bytesRead = recv(conn_socket, BufferIn, sizeof(BufferIn), 0);<br />
		// Check for error and terminate the thread if any found<br />
		if (bytesRead == SOCKET_ERROR) <br />
		{<br />
			g_szFormatting.Format("Couldn't receive data, %d",WSAGetLastError());<br />
			::MessageBox((HWND)NULL,g_szFormatting, NULL,MB_ICONEXCLAMATION );<br />
			closesocket (conn_socket);<br />
			WSACleanup();<br />
			return -1;<br />
		}<br />
<br />
		retval = sendto (conn_socket, (char*)TxBuffer, sizeof(Tx_Data), 0, (struct sockaddr *)&from, fromlen);<br />
		if (retval == SOCKET_ERROR)<br />
		{	<br />
			g_szFormatting.Format("Couldn't send data, %d",WSAGetLastError());<br />
			::MessageBox((HWND)NULL,g_szFormatting, NULL,MB_ICONEXCLAMATION );<br />
			closesocket (conn_socket);<br />
			WSACleanup();<br />
		}<br />
	}

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 
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 

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.