473,395 Members | 1,458 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,395 software developers and data experts.

Sending file with winsock

Hi, I am making a LAN messaging program and I want to add file transfer. I know how to send text with winsock. But I was just wondering how do you actually open the file you want and send it. And how does the client go about receiving the file????

Thanks.
Nov 15 '06 #1
4 3153
albertw
267 100+
Hi, I am making a LAN messaging program and I want to add file transfer. I know how to send text with winsock. But I was just wondering how do you actually open the file you want and send it. And how does the client go about receiving the file????

Thanks.
hi

use a protocol (UDP is easiest)
and something like...


With udpIN
.RemoteHost = vbNullString ' set SERVER to listen
.RemotePort = 1003 'Port to connect to.
.Bind 1004 'Bind to the local port.
End With

With udpOUT
.RemoteHost = remotecomputername ' CLIENT - talk
.RemotePort = 1004 ' Port to connect to.
.Bind 1003 ' Bind to the local port.
End With

udpOUT.SendData filename


(not tested this yet, know with text it works)
Nov 15 '06 #2
hi

use a protocol (UDP is easiest)
and something like...


With udpIN
.RemoteHost = vbNullString ' set SERVER to listen
.RemotePort = 1003 'Port to connect to.
.Bind 1004 'Bind to the local port.
End With

With udpOUT
.RemoteHost = remotecomputername ' CLIENT - talk
.RemotePort = 1004 ' Port to connect to.
.Bind 1003 ' Bind to the local port.
End With

udpOUT.SendData filename


(not tested this yet, know with text it works)
Hi, I thought you had to add some stuff about changing it to binary?
Nov 15 '06 #3
albertw
267 100+
Hi, I thought you had to add some stuff about changing it to binary?
hi

suppose your need to use TCP instead
Nov 15 '06 #4
hi

suppose your need to use TCP instead
Yeah because the packets arrive in the correct order
Nov 15 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Eric Cory | last post by:
Hello Gurus I can't get Dart PowerFTP to do anything. I create the ftp oblect and set the connection values, but when I do a get, put or even an invoke for a site command, I always get the...
1
by: Nicolas Ghesquiere | last post by:
Hello I have a problem with my current program. The meaning of the program is to allow users to login to a server to allow them to access the internet. My program communicates with a MS isa...
1
by: saileshdewangan | last post by:
I am trying to send a file to my remote computer using winsock control in vb6
0
by: danishce | last post by:
Hello All: I am developing a client/server application using vb.net winsock programming. I am sending data to Server and at the same time receive the incoming data from the server. My application...
1
by: danishce | last post by:
I am developing a client/server application using vb.net winsock programming. I am sending data to Server and at the same time receive the incoming data from the server. Everything works fine but...
1
by: Robert Dufour | last post by:
Requirements are as follows. 1- There is a server application running named srvrApp. When an event occurs in the srvrAPP on the server, say InfoRcvd occurs, it must send information to a Winform...
2
by: davidcm | last post by:
Last week, I found some code on-line that allows me to send email via SMTP from my VB 6.0 application. I had to add the Winsock control to the project and add the code that performs the SendData...
2
by: =?Utf-8?B?R3JlZ0lJ?= | last post by:
Hi All, I have some problems with sending UDP packets using Winsock. I tried to send some to a closed port, and according to the documentation on Microsoft MSDN site...
3
AaronL
by: AaronL | last post by:
Hello, I am currently working on a project that has me in sort of a bind. What I want to do is retrieve web pages from the internet, and strip them down to just text. I'll get using Regular...
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: 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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
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...
0
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...

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.