Results 1 to 2 of 2
  1. #1
    amita_k29 is offline Member
    Join Date
    Feb 2009
    Rep Power

    Default Sending a .Doc file from client to a server through socket

    what is the code for sending a file from the client to a server?
    i need this in my project.
    can u all help me....

  2. #2
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    A sample algorithm might be like this

    1.Create a socket on a particular port to listen request
    2. Client connection arrives
    3. Read the contents received from client write to a file
    4. Close the streams and socket

    1. Create a socket which connects to server
    2. Open the file
    3. Process the file till end of file not reached
    3a) Read contents from file write it to socket
    4. Close the streams and socket.

Similar Threads

  1. To transfer a file from client to server
    By phani in forum Networking
    Replies: 4
    Last Post: 10-12-2010, 07:15 PM
  2. Server socket - send image to client
    By Hinty in forum Networking
    Replies: 2
    Last Post: 03-14-2009, 08:39 AM
  3. Client Server socket problem - help needed
    By kellaw in forum Threads and Synchronization
    Replies: 6
    Last Post: 10-03-2008, 07:49 PM
  4. Identify Client in Socket Client Server Application
    By masadjie in forum Networking
    Replies: 1
    Last Post: 12-20-2007, 10:18 AM
  5. sending jar files from client to server?
    By gobinathm in forum New To Java
    Replies: 2
    Last Post: 11-13-2007, 06:12 AM

Posting Permissions

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