Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



EOF not found

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 25-01-2010
Member
 
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 01:20 PM.
Reply With Quote
  #2  
Old 25-01-2010
Member
 
Join Date: Jan 2008
Posts: 1,515
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.
Reply With Quote
  #3  
Old 25-01-2010
Member
 
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.
Reply With Quote
  #4  
Old 25-01-2010
Member
 
Join Date: Oct 2005
Posts: 2,389
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.
Reply With Quote
  #5  
Old 25-01-2010
Member
 
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)
}

}
Reply With Quote
  #6  
Old 25-01-2010
Member
 
Join Date: May 2008
Posts: 2,007
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "EOF not found"
Thread Thread Starter Forum Replies Last Post
DNS not found !Destroyer! Networking & Security 4 09-12-2010 01:30 AM
m4d.dll not found Zhankana_n Operating Systems 5 10-03-2010 10:37 AM
ATL.DLL Cannot Be Found MobilePhoneGuru Operating Systems 3 02-12-2009 09:04 PM
Found in my pc bladesimple Networking & Security 3 10-03-2009 11:15 PM


All times are GMT +5.5. The time now is 11:38 AM.