473,378 Members | 1,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

how to send file throught socket, plz help me!

I'm a student, i try search on Internet but i can't find any sample how to
send file throught socket, between 2 computer! Please help me! Thanks!
Nov 16 '05 #1
1 5934
Hi Nguyen,

That's a fairly open question.

If it absolutely has to be through a socket that you have opened then you
need to create your own protocol that the server (source machine) and client
(target machine) use to tell each other what's going on.

The client will connect to the server's listening socket and they will have
a conversation over the TCP connection, and agree to transfer the file. At
which point you use the send command on the server side socket to transfer
the file to the client.

That's a very general overview. I strongly recommend that you get yourself
an FTP component instead. This will greatly simplify your task.

Try http://www.xceedsoft.com/products/FtpLib/index.aspx. The price may be
too much for you, so it might be worth searching the web for other suppliers
of FTP components.

Sorry if all this is very general, but it's such a wide question that all I
could do was supply a few pointers.

Regards

Adam.

--
===========================
Adam Benson
Omnibus Systems,
Leics. UK
Email : Ad*********@NOSPAM.omnibus.co.uk

"Nguyen Thanh Danh" <k6*****@hcmc.netnam.vn> wrote in message
news:Ot**************@TK2MSFTNGP12.phx.gbl...
I'm a student, i try search on Internet but i can't find any sample how to
send file throught socket, between 2 computer! Please help me! Thanks!

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gregory Hassett | last post by:
Hello, I want to periodically send a TCP packet to a peer, always from the same source port. That is, each packet will come from my local ip address, port 8801, and go to the peer's ip address,...
11
by: hazz | last post by:
smtpClient.Send(message) is causing me problems as per specifics in the trace below. Email is sent but not without this error typically upon sending the second email, but sometimes when running...
3
by: BuddyWork | last post by:
Hello, Could someone please explain why the Socket.Send is slow to send to the same process it sending from. Eg. Process1 calls Socket.Send which sends to the same IP address and port, the...
0
by: Buddy Home | last post by:
There is two examples of code. Example 1. Send and Receive within the same process. Put this code in a console app called SendAndReceive and run the code. using System; using...
1
by: danfolkes | last post by:
Hey Everyone, I am trying to send repeated messages from a "Node" to a "Server". It works the first time I send the from the Node to Server, but after that it either errors, or does not do...
3
by: danfolkes | last post by:
Why does the message send only once? The node sends once, then fails after that. <code> import socket import thread import time def Node(nodeAddress):
4
by: gvijayaratnam | last post by:
Hi All, I have a fn prototype as follows void print ( char *Buffer, usigned long bufferSize, int chunkSize ); This fn will accept binary file buffer and the buffer size and the chunk size,...
2
by: SvenV | last post by:
I based my program on the asynchronous client/server example on msdn. There weren't too many modifications to the original code. I just created some extra code to response to different messages. F.e....
3
by: EricKit | last post by:
I'm trying to use socket.send() to send real time images from a camera as fast as possible from a single board computer. I am going over a wireless connection over a mile with almost 1W output power...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.