|
-
August 29th, 2001, 10:49 AM
#1
Server and client for transfer files
hi guys,
i m building a server and a client for transfer files between them.
1) what is the best way to do it? using ftp or
tcp/it?
2) how do i set my server to be ftp server?
i am a begginer in all this network programming so if you can give me an example code i will appriciate.
thanks,
ohad.
-
August 29th, 2001, 10:56 AM
#2
Re: Server and client for transfer files
Set a reference to the Winsock control and play with that some. Looking at it's properties/methods in the object browser will give you some ideas. Don't have an example... sorry!
-
August 29th, 2001, 06:42 PM
#3
Re: Server and client for transfer files
1)FTP is a protocol based on TCP/IP. U can use Inet control or Mabry FTP control. ...using winsock control to control an FTP connection... It's too hard!
2)If U have a OS windows U can find the installaztion of a FTP service in Option pack 4.
but is your server in LAN or you have a Internet Connection with server?
hi,brt
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
</center>
-
August 29th, 2001, 11:16 PM
#4
Re: Server and client for transfer files
you can use the winstock control to transfer the file to the server and its better you use tcp/ip protocol instead of ftp.
you can use winstock properties like senddata
you have to write the code in ws_dataarrival ,ws_connect procedures
-
August 30th, 2001, 01:06 AM
#5
Re: Server and client for transfer files
hi,
i tried to use winsock control but it doesnt transfer the file himself.
when i write: winsock1.SendData nameofthefile.
i recieve the name of the file in the server and not the file himself.
any idea how i can send the file himself?
p.s. i dont want to read the file until eof and send line by line to the server.
thanks,
ohad
-
August 30th, 2001, 01:09 AM
#6
Re: Server and client for transfer files
hi,
i need it to be both. lan and internet.
ohad.
-
August 30th, 2001, 01:20 AM
#7
Re: Server and client for transfer files
If you don't want to read the file, and then send it line by line, you will have to use another control than the winsock.
Winsock basically means "we make the connection for you, what you do with the connection is up to you".
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
August 30th, 2001, 01:44 AM
#8
Re: Server and client for transfer files
U must add Microsoft INternet TRansfer control 6.0. ThenU must add an iNet control and set protocol=icFTP.
Inet1.UserName = "myuser"
Inet1.Password = "mypwd"
Debug.print Inet1.OpenURL("myserverFTP/mydocument")
hi,brt
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
</center>
-
August 30th, 2001, 01:45 AM
#9
Re: Server and client for transfer files
u can use internet transfer control u have an ocx called msinet.ocx.if u use this ocx u get that control and then u specify the protocol as iftp,
u have to specify the proxy,the host the remote server e.t.c after you do this you can put in this particular code
Private Sub cmdSEND_Click()
Inet1.Execute txtURL.Text, _
"SEND C:\MyDocuments\Send.txt SentDocs\Sent.txt"
End Sub
this will transfer the file.which this control you can even get the file from the server.for more info you can go to hlp files.
Hope this will solve ur problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|