|
I am not sure about the transfer, but a way to get proper answers in CP is not reposting[^]
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Yes, there is.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
thanks for your reply but i need to sending and receiving data across a internet
|
|
|
|
|
That is exactly what sockets were designed for. Try a Google search and you will find plenty of samples and tutorials that will help you.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Okay but i tried many sample socket program it's works fine within a network ips like 127.0.0.1 but i tried to connect dynamic ip( which is get for www.whatismyip.com) it's fails to communicate..
|
|
|
|
|
ravijmca wrote: but i tried to connect dynamic ip( which is get for www.whatismyip.com) it's fails to communicate..
To use IP there are two computers: client and server.
To use IP there MUST be a way to route between those two computers.
To route the address of the server must be exposed to the client. There are ONLY two ways to do that on the internet.
1. The server MUST have a public IP.
2. The server MUST have a network setup (routers/gateways) such that a public IP will route to the server (the server need not have a public IP.)
whatismyip will always give a result but that result doesn't mean anything. All that matters is 1/2 above.
For normal ISPs there are three ways that they provide customers with "internet".
1. The customer has a static public IP.
2. The customer has a dynamic public IP.
3. The customer does not have a public IP. (in this case it does not matter whether it is static/dynamic.)
The result of whatismyip is only relevant to the above if the ISP is 1 or 2. If that is the case then the IP listed is the one that your computer (or router/modem) has.
Note that 127.0.0.1 is not a public IP nor is it a private one for that matter. (Also just because your computer has a public IP it doesn't mean it is public on the internet but it does make it more likely.)
|
|
|
|
|
You forgot to mention the added interference of firewalls into the whole equation.
|
|
|
|
|
anybody can help me...
i have a problem, how to make a file transfer UDP client-server by giving 1 bit error in the file being sent?
|
|
|
|
|
Your question is a bit unspecific. What do you have trouble with? UDP? Using the parity bit thing? Reading a file? What did you try until now?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
|
Why UDP?
UDP does not offer reliability. But In case of file transfer reliability is important.
Are you sure its UDP? not TCP?
|
|
|
|
|
yeah,UDP
I want to create a program that can send the file. but when the file is received the client, a large bit of data is not the same. then resend the request until the server successfully.
if you have the source code in c?
for my coursework ...thank's
|
|
|
|
|
Brillian Kharisma wrote: you have the source code in c? for my coursework
All the more reason for you to do it yourself. Ask us specific questions about specific code problems to help you. No one here is going to do it for you.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
UDP is NOT typically used for file transfers because it's not reliable. If you add parity, you can detect errors and request resends, but you're just replicating TCP at that point.
Brillian Kharisma wrote: if you have the source code in c?
for my coursework ...thank's
You need to do your own homework. Sorry.
|
|
|
|
|
The only advantage you gain from UDP is speed. I use UDP for realtime hardware status updates but I never use it to transfer files. Why not use TCP as others have suggested. It was designed for streaming files. You could also check out named pipes.
|
|
|
|
|
I want to get two front and profile picture of a person then make 3D Head model of it using Visual C++ and openGL.
How could I start?
|
|
|
|
|
Look Creating 3D Head model open GL C++here[^]
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
|
Hello everyone!
I have a EasyN ip Camera and I want to take the picture as .Jpg. The url that displays the image in my browser is http://192.168.1.xxx:xx/videostream.cgi.
After many hours searching in the internet I found this interest tutorial Camera Vision - video surveillance on C#,
but because I do not know much about Visual Studio did not help me very much.
Specifically, I have created a Visual C # Console Application but when I try to debugging shows some errors like: "The type or name 'HttpWebRequest' could not be found (are you missing a using directive or an assembly reference?)".
What am I doing wrong and the program not works?
Initially, What I want is the picture is automatically saved in my hard disk as .Jpg format. How can this happen?
Here is my code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
string sourceURL = "http://192.168.1.xxx:xx/videostream.cgi";
byte[] buffer = new byte[100000];
int read, total = 0;
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(sourceURL);
WebResponse resp = req.GetResponse();
Stream stream = resp.GetResponseStream();
while ((read = stream.Read(buffer, total, 1000)) != 0)
{
total += read;
}
Bitmap bmp = (Bitmap)Bitmap.FromStream(
new MemoryStream(buffer, 0, total));
}
}
}
It would be valuable any of yours help!
Thank you!
|
|
|
|
|
Your first problem is that you have posted this in the C++ forum rather than the C#[^] one. However the error message means that a reference is missing from your project.
[edit]Right click with your mouse on the References section of Project explorer and select "Add Reference ...", then find the assembly named "System" in the .NET section, and add it to your project.
You will also need to add the following statement to the top of your source code:
using System.Net;
[/edit]
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Thanks for your answer! I apologize for my mistake ...
I've done all everything you said and actually decrease errors. However there are still 5 errors relating some wrong commands. For example, some of errors are:
"The type or name 'Stream' could not be found (are you missing a using directive or an assembly reference?)"
"The type or name 'Bitmap' could not be found (are you missing a using directive or an assembly reference?)"
"The type or name 'MemoryStream' could not be found (are you missing a using directive or an assembly reference?)"
Do you know how experiencing this error?
|
|
|
|
|
Eventually was missing the command using System.IO;
So the following 2 errors are gone
"The type or name 'Stream' could not be found (are you missing a using directive or an assembly reference?)".
"The type or name 'MemoryStream' could not be found (are you missing a using directive or an assembly reference?)".
Now the problem is with the command Bitmap
|
|
|
|
|
Synodiporos wrote: Now the problem is with the command Bitmap
All of these classes are described in MSDN. Here is the link to Bitmap [^]; the others are easy to find.
And, more usefully, MSDN comes in many languages other than American.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Thanks for your advice Richard!
I have fix all the mistakes and now the program is running. The problem now is that i take a warning in this line:
while ((read = stream.Read(buffer, total, 1000)) != 0)
The warning says “Specified argument was out of the range of valid values.
Parameter name: size”
I changed the size of the variable to a larger but the problem remains. I do not know what else should I do now ...
|
|
|
|