What is this? is this real life? now it works. But why?
I changed my FileSendRecieve to the following:
public class FileSendRecieve {
Socket socket;
OutputStream socketOut;
InputStream...
Type: Posts; User: elamre
What is this? is this real life? now it works. But why?
I changed my FileSendRecieve to the following:
public class FileSendRecieve {
Socket socket;
OutputStream socketOut;
InputStream...
Yeah i know, sometimes it works, and sometimes it doesn't. this makes it very hard for me to find the problem and fix it.
Also i don't know what that is about. I gave a possible explanation on...
That one is one big mess really, since the server and client are in the same console.
Also yes that is from the same object.
here is the messy AllInOne:
...
I honestly have no clue why the AllInOne works and why this one doesnt. I posted the output in the posts above your post. Or is that not what you mean?
Edit, wait a sec, the only thing that...
Owh, the client seems to read everything already, since this is what happens on the server:
2012-07-27 21:13:09.335 - SYSTEM: Logger initalized
2012-07-27 21:13:09.335 - SYSTEM: Server starting...
Ok i found something interesting, the second thime there are 0 bytes available to read.
2012-07-27 21:05:00.736 - SYSTEM: Logger initalized
2012-07-27 21:05:00.737 - DEBUG: Recieving first...
I have not, and i would not exactly know how i could do that? Is there some sort of function which tells me the amount of bytes that is available to read?
edit:
nvm, that would be the...
Hmm, i really have the idea that something might be wrong with the server. I could not see a reason why the client would not work? I printed out the values, and everything seems fine and should be...
Where would you say is a good place to debug?
I added some debug lines:
Server output:
2012-07-27 20:29:11.830 - SYSTEM: Logger initalized
2012-07-27 20:29:11.831 - DEBUG: Recieving first file!...
I dont really know what the difference could be. The only thing is that all the classes are nested now. And that everything gets executed out of 1 class.
The output for the first client connected:
...
I have tried it with several clients, and putting sleeps in between so it takes a while. And without sleeps as well.
There is a lot of debugging, however i use my own made Logger for this, and...
Silly me, i just reinstalled my pc and forgot to install JDK.
Hmm, the odd thing is, in the AllInOne class, it works. But whenever i try to run it using the classes, it doesnt work. Would you mind...
Hmm, im not very good at this #-o I cant even seem to run it.
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.Closeable;
import...
Nvm, misunderstood it wrongly. Doing it right now.
Ok i updated my main post. Its a lot of code to process though. But i'd really like to fix it! :)
ok I'll update my post with the complete code.
The
while(true)
is there because i didnt want to close the socket. Just a test
I wish i could, but according to my logic it should NOT be doing that. That's where it goes wrong.
It's just a conclusion i made after doing research on the internet.
Hello all,
I'm trying to make my own dropbox kind of program. Just for the funs of it, and extreme customisation.
Now i've got a small problem while trying to send the file info in advance....