• Post Reply Bookmark Topic Watch Topic
  • New Topic

File Uploading  RSS feed

 
amod gole
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I want help from you,

i am developing simple chat application using socket.and my application is working perfectly fine.
now i want to add one more feature in my application and that is file uploading can any one help me in that,i don't want any code.
i just want direction.

Please help me,

Thank you
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll have to invent your own tiny protocol, maybe a header that says "Here comes file xxxxxxxx.xxx" followed by some bytes of data. If you know the file size you can include the size in the header so the receiver knows how many bytes to read. Look into the HTTP headers. You don't need to implement HTTP but it might be nice to use some of the same conventions.
 
Tal Nathan Tal Nathan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with the above post.
Also you may need to open a second socket/port for transmitting data while maintaing your communication port for your protocol unless you require no communication while data transmission is occuring.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!