Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SENDING FILES FROM CLIENT to SERVER  RSS feed

 
Zaafir Barahim
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please i need to send files from 3 clients to a single server at the same time and the server need to store all the received files. please help me out to write the code from the begining- client and server. Thanks in advance for any help!
 
Ajay Singh
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whats the server here? If its ftp you can use commons-net to do that easily.
 
Zaafir Barahim
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i will have 4 pc , one acting like a server that is the remaining 3pc will all send text files to the 1 pc that is the server. i need the code to be able to send the file from one PC to another.
 
Reza Rav.
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I know as technologies to perform this are:
Socket, RMI and Web Service

Socket is best choice.
Assign each computer an IP, you can encode your files (for example 64 encoding) then send them via stream for example(ByteInputStream and ByteOutputstream) then at destination after receive them you can decode them.
 
Zaafir Barahim
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can i get a link to get a sample or the code which does the tasks of sending files
 
Reza Rav.
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I don't have "Hello world" file sending via socket to give it to you. but you can google for file transfer via socket or similar literals.
 
Sushil Sharma
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are your requirements such that it cannot be filled by ftpor similar protocols?
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sample code from Sun:

here

Guy
 
Jessid Leon Velez Gutierrez
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
se me hace que lo que quieres es que te hagan la tarea de la escuela...

Show some effort!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!