Page 2 of 2 FirstFirst 12
Results 21 to 22 of 22
  1. #21
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Rep Power


    You are too arrogant for me to help you further.

    Writing huge amounts of code without testing the fundamentals, such as a game that is supposed to work over the Internet, without designing in easy ways to try difference delivery approaches is a waste of time. As you are finding out.

    As a closing comment, think about refectoring your objects so that you can change the network exchange properties without changing lots of unrelated code. Because you will change the networking approach.

  2. #22
    Ambuscade is offline Member
    Join Date
    Oct 2008
    Rep Power


    I've been out of town this past week so I haven't been able to do anything programming wise with my program :( but since I've been back I've been modifying my code.

    Quote Originally Posted by Norm
    To isolate the problem, you may need to write a small test program using writeObject() and get that to fail, then make changes to it unitil you figure out what's wrong. Also with a small test program that demonstrates the problem, others can work on it.
    I haven't been able to get a small test program to fail. I think it might have something to do with the Object that I am writing. I used wireshark to see what the TCP traffic looked like and I found that before the program crashed, a lot of DUP ACKs had been received by the server/client and the TCP connection timed out which might be the cause of the crash and burn. I don't know why the TCP connection would fail like that.

    Quote Originally Posted by Norm
    Or with your design, can you replace writeObject() with another writeXXX method that does your own encoding of the data and then replace the readObject() with your code that decodes the data back into the object that the rest of your code requires.
    I came up with an encoding scheme so that I can write only the data I acutally need via Strings. I used PrintWriter/BufferedReader instead of ObjectOutputStream/ObjectInputStream. I have no problems now networking outside or inside of a LAN but I still don't understand why it gave me problems before.

    Thanks for your help Norm.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Java networking.
    By tim in forum New To Java
    Replies: 7
    Last Post: 07-16-2009, 11:43 PM
  2. help with networking and threads
    By byuu in forum Networking
    Replies: 9
    Last Post: 05-21-2008, 06:03 AM
  3. java networking via browser
    By in forum Networking
    Replies: 2
    Last Post: 04-21-2008, 06:25 PM
  4. Java networking programming (I)
    By Java Tutorial in forum Java Tutorial
    Replies: 0
    Last Post: 12-24-2007, 08:21 PM
  5. Multithreading + Networking (desperate)
    By bluebarca in forum New To Java
    Replies: 1
    Last Post: 11-07-2007, 03:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts