Results 1 to 6 of 6

Thread: EOF not found

  1. #1
    Join Date
    Dec 2009
    Posts
    213

    EOF not found

    Hello,
    I send the contents of a file with my method "sendFile" from client to server and it arrives until the end of file great. For cons, the waiter comes to write the file using the method stock but never goes out of the while loop, never finding a value of -1. That is the EOF is not found by the program. Do you have any ideas about this kind of a problem? If there is solution available with you, then kindly help me. Thanks in advance.
    Last edited by Aaliya Seth; 25-01-2010 at 12:20 PM.

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    Re: EOF not found

    Hello,
    I have not gone too much in your program but I think the comman mistake most programmer do is to, try to close 2 times did not close the stream properly, though I am not sure. Check if the class dataOut is closed properly. So add to the finally did. Try it just the small change and tell me if it changes something.

  3. #3
    Join Date
    Dec 2009
    Posts
    213

    Re: EOF not found

    Hey
    Thanks for your reply, I did what you said and the file goes well, by cons I have an error in my post with the loop (a readObject ds a while (true)) that uses these 2 methods for making the dataIn.close () it closes the input connection of the socket. So my readObject throws an exception. Thank you again. If you have any other aternative for this then tell me.

  4. #4
    Join Date
    Oct 2005
    Posts
    2,394

    Re: EOF not found

    Hello,
    I have not quite captured it. I think you are complicating things now. Why there is a readObjet a while (true) What is this code? Otherwise it is clear that if you use it to open something in the code somewhere else should not close it immediately. I think you need to think again with your code, modify it and post again.

  5. #5
    Join Date
    Dec 2009
    Posts
    213

    Re: EOF not found

    Hello,
    This is how my code works, this is not the complete code, but I have posted the important part of the code, just check it and verify it is correct or not, if not then please guide me.
    Code:
    while (true)
    {
    test = readObject ()
    
    if (test.getClass () == "some")
    {
    sendFile (clientSocket)
    }
    
    }
    
    and server side I have something like this:
    
    while (true)
    {
    test = readObject ()
    
    stock (clientSocket)
    }
    
    }

  6. #6
    Join Date
    May 2008
    Posts
    2,015

    Re: EOF not found

    Hello,
    Your problem is probably your readObject method because there is nothing wrong. Have you tried that it closes properly and debug the readObject to see it or plant? Maybe you'll have to open a stream in readObject. Other part of the code and the logic seems correct, that is not a large part of your code is wrong.

Similar Threads

  1. DNS not found
    By !Destroyer! in forum Networking & Security
    Replies: 4
    Last Post: 09-12-2010, 12:30 AM
  2. m4d.dll not found
    By Zhankana_n in forum Operating Systems
    Replies: 5
    Last Post: 10-03-2010, 09:37 AM
  3. ATL.DLL Cannot Be Found
    By MobilePhoneGuru in forum Operating Systems
    Replies: 3
    Last Post: 02-12-2009, 08:04 PM
  4. Found in my pc
    By bladesimple in forum Networking & Security
    Replies: 3
    Last Post: 10-03-2009, 10:15 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
  •