urllib.urlretrieve returns silently even if the file doesn't exist on the remote http server, it just saves a html page to the named file. For example:
urllib.urlretrieve('http://google.com/abc.jpg', 'abc.jpg')
just returns silently, even if abc.jpg doesn't exist on google.com server, the generated abc.jpg is not a valid jpg file, it'...
I'm working on an RTS game in C++ targeted at handheld hardware (Pandora). For reference, the Pandora has a single ARM processor at ~600Mhz and runs Linux. We're trying to settle on a good message passing system (both internal and external), and this is new territory for me.
It may help to give an example of a message we'd like to pas...
Not sure how to phrase this again, but... this is what I'm trying to do:
I'm writing a program to scan for duplicate logged on users (Users logged on more than once) on my network at work.
I can write the duplicity finder, but I need a way to be able to send a message out to that user saying they aren't allowed to be logged on more tha...
SOCKET client = accept(listen_sock, 0, 0);
timeval client_to;
client_to.tv_sec = 1;
client_to.tv_usec = 0;
setsockopt(client, SOL_SOCKET, SO_RCVTIMEO, (char*)&client_to, sizeof(client_to));
char buffer[1024];
while ((ret = recv(client, buffer, 1024, 0)) != 0)
{
cout << "<in loop>" << endl;
if (ret == -1 && WSAGetLastErr...
I'm working on an app which takes in a raw binary message (very simple, first byte is the message type, rest is payload), and then does something with it. The thing I'm trying to accomplish is making sure that the networking service is abstracted away from the rest of the app, to allow for modifying the protocol now and then without affe...
I am interested in learning more about manipulating network traffic to utilize LAN only programs (games in this case) over the internet.
There already exists several programs that does this (Hamachi, GArena), but I am interested in learning how they approach this and how to build this from the start up.
Obviously you need to capture th...
I'm a Java coder and not very familiar with how networks work (other than basic UDP/TCP connections)
Say I have servers running on machines in the US, Asia, Latin America and Europe. When a user requests a service, I want their request to go to the server closest to them.
Is it possible for me to have one address: mycompany.com, and s...
I have a class that is responsible for network communication. I would like to have a unit test for it.
Here is where I'm stuck in order to write a test for it i have to implement a server to communicate with but that in turn will require its own test.
How do you write tests for a class such as this?
...
Hi all,
I have a question and I am very open to suggestions (even very odd ones!)
I am writing an iPhone app, which does a request (URL with parameters) to a server. As a response, the iPhone receives XML. All is well.
Right now, I am looking to improve my application's speed by measuring the time it takes to perform certain tasks. I'...
I'm trying to send a Java UUID to C++, where it will be used as a GUID, then send it back and see it as a UUID, and I'm hoping to send it across as just 16 bytes.
Any suggestions on an easy way to do this?
I've got a complicated way of doing it, sending from Java to C++, where I ask the UUID for its least and most significant bits, wri...
Hi All,
I have a data card, as soon as i insert the data card, i am getting the events by using wm_device_change event.
But I also want to get event, when my data connect actually connects to out side world.
I mean to say, as soon as we click on connect/disconnect button of data card,i want to get the event.
exactly speaking wanted t...
Hi all,
I am writing a Network program, and i am using NP_ENUM_NETWORK in my win32 application.
when i serach in my system i am not able to locate this enum
can i know in which header file, i wil get this enum.
is there any SDK provided by microsoft for network application development where i can get this enum.
with regards
Vinayak...
I want to set attribute of a file in network to ReadOnly.
File.SetAttributes(@"\\data\ntshare\tmp\Trades_LastFileUploaded.csv", FileAttributes.ReadOnly);
It goes fine, but after this when i check my file over network it still appears to be !readOnly.
Also, when i try to manually (using file properties) set the ReadOnly flag. It goes f...
Hi all,
Hopefully this is a quick and easy question about BufferedOutputStreams and DataOutputStreams in java.
When I write bytes to the output stream like
myBufferedOutputStream.write(array);
myDataOutputStream.write(array);
Do these methods write them instantly to the stream and return or do they ever block?
I did not see anythi...
I know that such type of questions exist in SF but they are very specific, I need a generic suggestion. I need a feature for uploading user files which could be of size more that 1 GB. This feature will be an add-on to the existing file-upload feature present in the application which caters to smaller files. Now, here are some of the opt...
I have client/server applications and a very simple protocol for communication. More precisely, it's a set of commands a server sends and a set of requests a client can make.
The idea is as follows:
When a command is made by the server, a client has to execute it.
When a request is made, server checks permissions and if everything is o...
How can I do the following things in python:
List all the IP interfaces on the current machine.
Receive updates about changes in network interfaces (goes up, goes down, changes IP address).
Any python package available in Ubuntu Hardy will do.
...
Let's say I have a Linux machine that is being bogged down by some network traffic. Might be someone FTPing a large file to it, a bunch of people downloading a large file, etc.
What are some options I could use to determine this? I've looked over say the netstat man but I'm not sure if this would be exactly what I need. It could at leas...
I would like to visually evaluate web pages response time for several Internet connections types (DSL, Cable, T1, dial-up etc.) while my browser and web server are on the same LAN or even on the same machine. Are there any simple network tools or browser plug-ins that slow down network bandwidth to simulate different real-world connectio...
Hello.
Is there a way, from within a Cocoa application to change the system network settings (specifically, the proxy settings). I've found that there is a file called preferences.plist in /Library/Preferences/SystemConfiguration that has the settings I want, but I can't figure out how to get the system to process changes to this file ...