network

Faster DirectoryExists function?

Hi, I use DirectoryExists (const PathName : String); to check if a directory is reachable from a computer or not. But if the directory does not exist and the path name is a network path, i.e. \\computer1\Data the method takes a very long time to return. There must be a faster way to determine that a network folder is not reachabl...

iPhone and the arp table

I want to get the mac addresses for all hosts on a given subnet. So far I force an arp table update by pinging all ips involved. After that I query the arp table and everything is fine. The problem is how to improve the update speed. Pinging 65000 addresses takes about 15 minutes on an iPhone 3GS. Even if I do not wait if a response is ...

Android: How to check if the server is available?

Hi, I am developing an application which connects to the server. By now the login and data transmission works fine if theserver is available. The problem arises when the server is unavailable. In this case the method sends a login request and waits for the response. Does anyone know how to check if the server is available (visible)? T...

Advantages of knowing for a client, how big the package sended by the server is

I'm really new at network-programming, so I hope this isn't a complete Newbie-question. I read a tutorial at the Qt-Homepage how to build a little server, and I found this: QByteArray block; QDataStream out(&block, QIODevice::WriteOnly); out << (quint16)0; out << "..."; // just some text out.device()->seek(0); out << (quint16)(block.s...

listing network shares with python

Hello, if I explicitly attempt to list the contents of a shared directory on a remote host using python on a windows machine, the operation succeeds, for example, the following snippet works fine: os.listdir("\\\\remotehost\\share") However, if I attempt to list the network drives/directories available on the remote host, python fails...

Reparing a "disconnected" drive mapping

Sometimes a network drive that is already mapped to a drive letter because "disconnected". Using the normal Windows functions to access files / folders on that drive fail. As soon as the user manually clicks on that drive it the Windows Explorer dialog, it's magically repaired. Since my program is a batch program I'd like to start this ...

How to get local host address and subnet mask in Java ME?

Is there a way to find those values in ME (Either CDC or CLDC)? All the examples I found used SE methods. ...

how to share files between program instances

Hi, my desktop application lets users add (~20MB) files, which should then be available for other users of the application. Currently I handle the uploads/downloads with my own code, but I am getting errors from file transfers that dropout, corrupted files, etc. I really don't want to deal with all this so I plan to use an existing file...

Objectdeserialization over network

hello, i am getting an excepetion when i try to read an object from an ObjectInputStream via network like this: Socket socket = new Socket("localhost", 4444); ObjectInputStream ois = new ObjectInputStream(socket.getInputStream()); while ((Object o = ois.readObject()) != null) { } Here is the exception I get: java.io.EOFException ...

If my server knows a remote client's IP address, how do I send a message to the remote client?

The remote client is a desktop application running a windows.forms application. How do I have the server send the client a message, knowing the client's IP address? ...

Difference between "Network path not found" and "Access denied" in C#

In my C# .NET 2.0 application I'm accessing network paths, and I'd like to be able to tell the difference between paths that don't exist, and paths which do exist but for which I don't have access rights. I tried doing the following: try { string[] contents = Directory.GetFileSystemEntries( path ); } catch( Exception e ) { if( ...

Cannot access django app through ip address while accessing it through localhost

I have a django app on my local computer. I can access the application from a browser by using the url: http://localhost:8000/myapp/ But I cannot access the application by using the ip of the host computer: http://193.140.209.49:8000/myapp/ I get a 404 error. What should I do? Any suggestions? ...

How to bind an application to a particular network interface in LINUX?

How to do it? Like in windows, we have ForceBindIP see website ...

ASP.NET Read Files from a Password Protected Network Share

Hi - I have an ASP.NET website on a Windows 2003 Server, that needs to access files from a network share. The network share is password protected and needs a username and password to be provided. I use forms based authentication on the website and not windows based. So my problem is, when I try to read any file from the networkshare u...

iPhone Intermittent Network Testing

I've seen the "Testing iPhone app with limited network access" (link) question, and while it's a great tip, it's not very helpful in terms of testing the actual performance of a piece of code when used over EDGE. In my experience the network will randomly come in an out of connectedness. I'd like some way to simulate this. I'm thinking o...

Network IP blocker in C#

I am new to network programming. I want to create a network blocker. which blocks an IP from the LAN. How is this possible in C#? ...

Advice for a new project - Command line Chess game between two Ubuntu Machines

Hi All, I am a CS student and I'd love to make a command line chess game. Ideally I would be able to ping my moves directly to my opponent and just for fun I would rather use ASCII art to print the board (No memory chess) at the command line. I have a 4 year computer science degree under my belt and I'm just starting work as a Java pro...

Setting the Timeout in TCP

the timeout interval dynamically changes depending on the network. It is generally represented by TimeoutInterval = EstimatedRTT + 4*DevRTT But why do we you 4*DevRTT? Why can't it be 2*DevRTT?? ...

implementing ack over UDP?

We have a system (built in C) in place that performs communication over UDP. Recently we have found a necessity to guarantee delivery of packets. My question is: what would be the minimum additions to a UDP based system to ensure delivery using ack packets? Also, ideally without having to manipulate the packet headers. We have applic...

Should I use Nmap::Parser or Nmap::Scanner to audit a network?

I'd like to audit the equipment of my large network in the fastest way possible. Should i use Nmap::Parser or Nmap::Scanner? I want to create a list of IP addresses that return a ping as well as a related OS footprint and identification. Example: ping 192.168.*.* Then when I get a successful ping, store the IP address in a hash along...