Click here to Skip to main content
15,898,938 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Simple chat programs Pin
Melnx30-Mar-05 16:34
Melnx30-Mar-05 16:34 
GeneralRe: Simple chat programs Pin
Melnx30-Mar-05 16:36
Melnx30-Mar-05 16:36 
GeneralRe: Simple chat programs Pin
Aaron Sulwer30-Mar-05 16:54
Aaron Sulwer30-Mar-05 16:54 
GeneralRe: Simple chat programs Pin
Melnx31-Mar-05 10:12
Melnx31-Mar-05 10:12 
GeneralRe: Simple chat programs Pin
Melnx31-Mar-05 10:19
Melnx31-Mar-05 10:19 
GeneralRe: Simple chat programs Pin
Aaron Sulwer31-Mar-05 11:37
Aaron Sulwer31-Mar-05 11:37 
GeneralRe: Simple chat programs Pin
GHHTavasoli4-Apr-05 9:14
GHHTavasoli4-Apr-05 9:14 
GeneralProblems recieveing from a socket Pin
farklem29-Mar-05 11:30
farklem29-Mar-05 11:30 
Ok, I am writing an xbox program that recieves a list of items from a PC application through a UDP socket connection. Each item of the list is sent separately. I have created this thread that constantly listens for the list. The problem is that when the list is longer than around 120 items I get this error: "[XONLINE] udpWarn: [D00212C8] Receive buffer is full (16466 bytes). UDP packet plus 3 data bytes lost." I know that UDP is not very reliable but when the list is say 100 items I have never had it drop a packet.

<br />
#define MAXBUFLEN 1000<br />
DWORD __stdcall ListenerThread( void* listen )<br />
{<br />
	WSADATA WsaData;<br />
    int iResult = WSAStartup( MAKEWORD(2,2), &WsaData );<br />
    if( iResult != NO_ERROR )<br />
       Debug("Error at WSAStartup");<br />
<br />
	int sockfd;<br />
	struct sockaddr_in my_addr;    // my address information<br />
	struct sockaddr_in their_addr; // connector's address information<br />
	int addr_len, numbytes;<br />
	<br />
	if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1)<br />
		Debug("Socket Creation Error");<br />
	<br />
	my_addr.sin_family = AF_INET;			// host byte order<br />
	my_addr.sin_port = htons(8604);			// short, network byte order<br />
	my_addr.sin_addr.s_addr = INADDR_ANY;	// automatically fill with my IP<br />
	memset(&(my_addr.sin_zero), '\0', 8);	// zero the rest of the struct<br />
	<br />
	if (bind(sockfd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr)) == -1)<br />
		Debug("Bind Error");<br />
<br />
	addr_len = sizeof(struct sockaddr);<br />
	char* xrec = (char*)malloc(MAXBUFLEN);<br />
	while(true)<br />
	{<br />
		if ((numbytes=recvfrom(sockfd, xrec, MAXBUFLEN-1, 0, (struct sockaddr *)&their_addr, &addr_len)) == -1)<br />
				Debug("Recieve Error");<br />
		xrec[numbytes] = '\0';<br />
	}<br />
<br />
	return 0;<br />
}<br />

GeneralRe: Problems recieveing from a socket Pin
farklem29-Mar-05 14:25
farklem29-Mar-05 14:25 
GeneralDigital Logic Circuit Pin
popo8428-Mar-05 19:55
popo8428-Mar-05 19:55 
GeneralRe: Digital Logic Circuit Pin
Christian Graus30-Mar-05 12:01
protectorChristian Graus30-Mar-05 12:01 
GeneralRe: Digital Logic Circuit Pin
popo8431-Mar-05 16:22
popo8431-Mar-05 16:22 
GeneralRe: Digital Logic Circuit Pin
Christian Graus31-Mar-05 20:30
protectorChristian Graus31-Mar-05 20:30 
QuestionHow to dock a form? Pin
User 91483328-Mar-05 11:35
User 91483328-Mar-05 11:35 
AnswerRe: How to dock a form? Pin
Christian Graus30-Mar-05 12:02
protectorChristian Graus30-Mar-05 12:02 
GeneralDisk Imaging Pin
msiravian28-Mar-05 1:50
msiravian28-Mar-05 1:50 
Generalerror C2451 confusion Pin
Anonymous27-Mar-05 17:14
Anonymous27-Mar-05 17:14 
GeneralIMAGES TO MOVIE file Pin
Emiliano27-Mar-05 14:15
Emiliano27-Mar-05 14:15 
GeneralRe: IMAGES TO MOVIE file Pin
Christian Graus30-Mar-05 12:04
protectorChristian Graus30-Mar-05 12:04 
GeneralRe: IMAGES TO MOVIE file Pin
Emiliano30-Mar-05 12:40
Emiliano30-Mar-05 12:40 
GeneralRe: IMAGES TO MOVIE file Pin
Christian Graus30-Mar-05 12:47
protectorChristian Graus30-Mar-05 12:47 
QuestionUDP Socket sample code is needed??? Pin
Kimdave23-Mar-05 22:13
Kimdave23-Mar-05 22:13 
AnswerRe: UDP Socket sample code is needed??? Pin
eli1502197926-Mar-05 20:54
eli1502197926-Mar-05 20:54 
QuestionHow do you call COM from a C++ web service? Pin
Chris Disdero22-Mar-05 16:10
Chris Disdero22-Mar-05 16:10 
GeneralCorrupt output from WideCharToMultiByte. Pin
zen0n21-Mar-05 1:31
zen0n21-Mar-05 1:31 

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.