http://msdn.microsoft.com/en-us/library/fx6588te.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1
I've added a couple of things that look like this to it:
if (content.EndsWith("\x0"))
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine(content.ToString());
String retString = content.Substring(0, 1);
if (retString == "<")
{
if (content.Contains("<policy-file-request/>"))
{
Console.WriteLine("is a policy");
Send(handler, "<cross-domain-policy><allow-access-from domain='*'
to-ports='*' /></cross-domain-policy>" + "\x0");
}
if (content.StartsWith("<doanyversioncheck/>"))
{
Console.WriteLine("is a version check");
Send(handler, "yourv 1" + "\x0");
}
}
}
I've looked around google as much as I can, but I'm stumped - no matter what, it always seems to only send one packet at a time to the user. Being newish to C# and sockets... well, it's hard, haha.
What can I do to fix this, so that a user can receive more than one packet, after sending many requests asking for different ones?
Thank you in advance!