Search:

Type: Posts; User: Norm

Search: Search took 0.19 seconds.

  1. Replies
    13
    Views
    3,242

    Re: I am trying to make a messenger program!

    Your code is too simple minded. It needs to read some bytes in and write those bytes out in a loop until there are no more bytes to be read.
  2. Replies
    13
    Views
    3,242

    Re: I am trying to make a messenger program!

    Add some printlns in the loop to print out the values of bytesRead and current to see what the code is doing. Compare to the value of filesize.

    Also you need to read the API doc for the read()...
  3. Replies
    13
    Views
    3,242

    Re: I am trying to make a messenger program!

    If it works properly, please explain the problem.
  4. Replies
    13
    Views
    3,242

    Re: I am trying to make a messenger program!

    Your code has a hard coded filesize variable. Is the size correct for the file you are trying to send?
  5. Replies
    13
    Views
    3,242

    Re: I am trying to make a messenger program!

    What is written to the output file? Is there a problem with it?

    The code basically works for me when I use localhost.
  6. Replies
    13
    Views
    3,242

    Re: I am trying to make a messenger program!

    Are you saying that Each PC is a server that other PCs can connect to directly. No master server.
    How do the PCs get the IP addresses of the other PCs?
  7. Replies
    13
    Views
    3,242

    Re: I am trying to make a messenger program!

    Are you going to write both a server and client code? There are dozens of sample programs from students on the forums.
Results 1 to 7 of 7