Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-28-2005, 07:06 PM   #1
LQ Newbie
Registered: Sep 2005
Posts: 11

Rep: Reputation: 0
File Share Server


I am trying to make a file transfer program that can send and receive files from a server running on a linux-based(QNX) system and the client is on a Windows 2000 machine.

Will this be a good approach:-

1. Display Menu on Client: a) Upload b)Download
2. Get file name
3. Send the command 'a' or 'b' to the server using send()
4. Server receives the command using recv()
5. If 'a'
"Client Side"
i) send size of file
ii) send file ?? [should i send it as multiple of 512/1024 or in one go]
"Server Side"
i) Recieve the file size using recv()
ii) Read to buffer using recv()
iii) Write buffer to file
if 'b'
"Client Side"
i) get size of file
ii) recv file
iii) write to file
"Server Side"
i) send size of file
ii) send file ?? [should i send it as multiple of 512/1024 or in one go]
"Server Side"

Is there a better way ?? If so, how and any examples would def be appreciated.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie Question - Auto mounting of server share file dodjie60 Linux - Networking 15 09-12-2005 09:34 AM
can we configure a Linux server with mail server,file server and web server kumarx Linux - Newbie 5 09-09-2004 06:21 AM
samba as a file server/share mnadeemrao Linux - Software 0 10-30-2003 05:21 AM
file share andox Linux - Newbie 1 06-14-2003 03:54 AM
Changing file permissions on a SAMBA file share apenney Linux - Software 0 02-11-2002 04:42 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:02 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration