Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7956419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:59:03+00:00 2026-06-04T03:59:03+00:00

I’ve developed a nice free game for Windows Phone 7, which is called Domination,

  • 0

I’ve developed a nice free game for Windows Phone 7, which is called Domination, and which is, despite the early release, quite a success!

Now, I’m developing an Online Multiplayer Version, which regards interesting features, and now that I’ve almost reached the end, I’m encountering a BIG problem.

WEIRD packet loss, or something like that.

I’ve a sample for reproducing the problem.

I’ve a Server.
I’ve a Win Form Client
I’ve a XNA Client

steps to reproduce the problem:

1) you start the server, the win form and the game ( you need an emulator and WP7 SDK )

2) now, you press the GO button, and the form will open the TCP channel to server

3) now, you press the screen on emulator, and the form will open the TCP channel to server

4) now, each time you press the screen emulator, or the GO button on win form, the server will send you back 50 messages on proper client

well, the problem is that

1) win form usually receives 50 messages, RARELY loses 10 packets on one communication, but it’s RARE

2) emulator, ALWAYS loses 30-40-45 messages!!!!!

I’ve tried other ways, but nothing changed..

one tip, if i put a Thread.Sleep(10) which 10 is 10 milliseconds, for each Server Send, it works perfect!!

Can anyone help me please? I just don’t know where to put my head!

samples can be found here:

http://uploading.com/files/d7e7939c/Projects.zip/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:59:04+00:00Added an answer on June 4, 2026 at 3:59 am

    No messages are being lost. They are all being received. Your code is just not correctly interpreting the received data. If you look at the number of bytes received, it will be correct. If you look at the data in the bytes received, it will be correct. The rest is up to your code.

    TCP provides a byte stream service. That means you get out the same bytes you send. If you need to “glue” those bytes together into messages, then you must write code to do that. If you send 30 bytes, you might receive 30 bytes, or 10 bytes and then 20 bytes, or 1 byte 30 times, or anything in-between. If you send 5 bytes and then 3 bytes, you might receive 5 bytes and then 3 bytes. Or you might receive 8 bytes. Or you might receive 1 byte 8 times.

    You must define a message format. You must code the sender to send messages in that format. You must code the receiver to identify when it has received a complete message.

    What’s happening is that you are sending “FOO” and then “BAR” and receiving “FOOBAR”. Nothing has been lost in this process except the boundary between “FOO” and “BAR”. However, TCP has no concept of a message boundary. If you need them, you must code them. For example, you could send “3FOO3BAR”. Now, no matter how that gets received, the receiver knows that “FOO” is one message and “BAR” is another. Another choice is “foo\nbar\n” (foo newline bar newline). The receiver knows that it has a complete message when it receives a newline character.

    But however you define an application-level message, you must actually write the code to do it. It won’t happen by itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.