473,769 Members | 7,923 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5959
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*********@NOS PAM.omnibus.co. uk

"Nguyen Thanh Danh" <k6*****@hcmc.n etnam.vn> wrote in message
news:Ot******** ******@TK2MSFTN GP12.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
3033
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, to HIS port 8801. This means that I need to bind my sender socket to (myaddress,8801), use it for the send, then shut it down and close it. Then I want to wait, say 30 seconds, and do it all over again. Naturally, the socket's ReuseAddress...
11
7726
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 the app, even the first time. The application will be required to be sending out repeated emails, about one every second or two. Must this be done asynchronously? Thank you. -Greg I get the generic error messages;
3
4312
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 receiver is running within Process1. If I move the receiver into Process2 then its fast. Please can someone explain.
0
3168
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 System.Collections.Generic; using System.Net; using System.Net.Sockets; using System.Runtime.Serialization.Formatters.Binary;
1
2740
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 anything. I would love some help, here is the code: import socket import thread import time
3
1744
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
10428
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, implementation must be open socket and send the buffer in chunks which is provided by the parameter.
2
1548
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. when I send GETARTICLES<EOF> it gets the articles from the DB and when I send something else it does that specific task. That all works fine. The problem is when I connect to the server and I try to send 2 commands after another. F.e. First get the...
3
6084
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 on 802.11. For many reasons, I have seen the need to find when my file has finished sending, but the socket.send only blocks until it has pushed the file to the buffer. Is there any way to check if the buffer is empty and the file sent? ...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.