Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file transfer problems using sockets

Status
Not open for further replies.

jdolluc

Programmer
Mar 13, 2003
3
US
I am using sockets for the first time and am trying to figure out some stuff. first off I am running off an example found at I have modified it slightly to my needs. I can use this to transfer files from within my home directory on the client box to the destination_directory on the server box, but I still have 2 questions.

1) When I try to send a file from another location it tells me (on the server) that the file is not found, when I KNOW it is there.

2) To send files from the server to the client do I need to open another channel or can I reuse the open channel? Is there an easier way to do this?

Thanks-
Jon
 
As for #1:
Permissions? Full path'd name?
Otherwise try the basic stuff like creating a
'ls' proc and 'cd' proc to debug the transfers.


As for #2:
No, you can use the same channel.
Model the transaction as per ftp for a model.
The client just needs to know how to send and
receive in this case.
 
Although there's nothing wrong with "rolling your own" file transfer code using Tcl sockets, would it be an option for you to use FTP instead? In case you overlooked it, Tcllib (the standard Tcl library) includes an FTP package implemented in pure Tcl. You can read more information about it on the Tcl'ers Wiki ( on the page "ftp," - Ken Jones, President, ken@avia-training.com
Avia Training and Consulting, 866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Sure,
Avia's right and the ftp package is very nice.
No use rerolling the wheel, unless you are
trying to learn how to use sockets or the like.

In which case I suggest you jump right in and
make your transfers secure by taking a look at
the tls extension:
 
Actually I am just testing feasiblity of a design proposal by an outside source. We need this connection to transfer images over a dedicated line. The actual application is kinda complex and hard to explain, but basically its like a video camera plugged into a TV. One machine is activly obtaining images, which are then tranfered to the other box to show them. Theres a lot more to it than that, but thats the simplefied version. We just wanted to make sure that tcp can be implemented into our existing code. Is there an easier way to do tcp besides sockets?
BTW: I would prefer to use FTP anyday, but I don't get paid to have preferences so....tcp it is....

Jon
 
Sounds like streaming video to me...
Tcl might be a little slow for this.
I'd inquire about the feasibility and any like
projects at comp.lang.tcl. You can use the google
group portal.
 
its more like streaming x-rays, but yeah. I'll look into the comp.lang stuff. Thanks guys.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top