network-programming

Need of Formula for Accurate Bandwith for 1 Gigabit NIC Card

I am Need of Formula to Accurately Calculate Bandwith for 1 Gig Nic Card. What i am doing is send Layer 2 Packets @ 1Gbps but my software is showing 6oo Mbps. The whole experiment is Back to Back. No switch No Router. Here is what i did. // LinkSpeed = 1Gb UINT nBandwidth = LinkSpeed/100;//Mbps nBandwidth = nBandwidth/8; //Bytes/...

How to Intercept connection requests?

Hello, I'm working on an app that needs to intercept when a program tries to connect to an specified IP address and redirects it to another IP. Is this possible? I'm using .net for this. thanks! ...

Find and start a VPN connection in VB .NET

Hi all, I am using NetworkInterface.GetAllNetworkInterfaces() to get all the interfaces on a PC. However, this appears to only return "active" interfaces. How can I find "inactive" network interfaces, such as unconnected VPNs, disabled NICs, etc. in .NET. I would like to find them by their name in "Control Panel" -> "Network Connectio...

Where is the Don't Fragment Bit of the IP Flags used?

I am curious to know where the "Don't Fragment" [DF] Bit of the IP Flags is used. As fragmentation is invisible to higher layers and they don't care too. I am also looking for an example. Thanks a lot in advance. ...

Everything a c++ developer should know about network programming?

So I am doing a lot of high performance network programming using Boost::Asio (or just Asio if you will), and have a pretty solid grasp of the essentials of both TCP and UDP protocols. I am wondering though, because I still don't consider myself an expert in networking despite my knowledge, what is a good way to frame the essentials of w...

What is the best algorithim/technique to control client connections to the server?

I have over 50 clients connected to one server (low end server, running windows 2003 server), every time there is a power failure or switch failure the clients will disconnect from the server, the server might remain on during this incidents (if power backup is installed), when the clients came back they automatically detect the server a...

What is the best way to implement a cross-platform, multi-threaded server in C/C++?

Part of the development team I work with has been given the challenge of writing a server for integration with our product. We have some low-level sensor devices that provide a C SDK, and we want to share them over a network for use by people collecting data. Sounds simple, right? Someone would connect a sensor device to their machine in...

To inetd or not to inetd... when should I use inetd for my network server program?

Can anyone give a concise set of real-world considerations that would drive the choice of whether or not to use inetd to manage a program that acts as a network server? (If inetd is used, I think it alters the requirements around networking code in the program, so I think it's definitely programming-related and not general IT) The ques...

UDP Broadcast or IP Multicast?

If you had to implement a network broadcast, would you use UDP broadcast or IP multicast in a new application? Why? What are the benefits and drawbacks you encountered with either method? (Especially concerning problems with VPNs, different subnets, various routers etc.) ...

How can I run two instances of the iPhone simulator (Aspen) to try out the WiTap example?

Has anyone had any luck running two instances of the iPhone simulator to test network code between the two? ...

Java RMI Resources

Hi everyone I am currently undertaking a project that involves extensive use of Java RMI and I was wondering if anyone is aware of any good resources about it. The problem I am having with the material I am finding currently is that its usually quite out of date (like Java 1.3) and / or half complete. I would even be happy to buy a book...

Creating a web server in pure C

Im doing a little project on my university which now involves in creating a Webserver only using C. I know a little about the HTTP 1.1 and i've created a webserver in C# before. However, I'd like to see a nice little tutorial on how you either begin socket programming and using multi threads in C or a complete "How to create a webserver...

During transmissions over localhost which layers are used in OSI Model?

While transmiting data via localhost address or 127.0.0.1 which layers are used in the OSI model? I believe communication starts through application layer and goes down till some layer but no data goes through physical layer, or does any? ...

"Specified network name is no longer available" in Httplistener

I have built a simple web service that simply uses HttpListener to receive and send requests. Occasionally, the service fails with "Specified network name is no longer available". It appears to be thrown when I write to the output buffer of the HttpListenerResponse. Here is the error: ListenerCallback() Error: The specified networ...

POSIX cancellation points

Can anyone point me towards a definitive list of POSIX cancellation points? I was just about to answer a question on stackoverflow and realised I didn't know my stuff well enough! In particular, are accept() and select() cancellation points? I have an old book that says no, but I've seen sites on the internet claim that they are. Con...

What have you used to test (functional/load/stress) your network service with its custom protocol?

I recently created a turn-based game server that can accept 10s of thousands of simultaneous client connections (long story short - epoll on Linux). Communication is based on a simple, custom, line-based protocol. This server allows clients to connect, seek for other players in game matches, play said games (send moves, chat messages, ...

How are sockets implemented in JVM?

Hi folks! I want to know, how sockets are implemented in the Java Virtual Machine. Is there a native library included? And if, is it a C library? Where can I find information about this topic? The offical Java tutorial on networking does not help me there. Some interesting links would help. Update: Are there any official informati...

Why am I seeing 'connection reset by peer' error?

I am testing cogen on a Mac OS X 10.5 box using python 2.6.1. I have a simple echo server and client-pumper that creates 10,000 client connections as a test. 1000, 5000, etc. all work splendidly. However at around 10,000 connections, the server starts dropping random clients - the clients see 'connection reset by peer'. Is there some...

Android HTTP Connection

Can anybody tell my why this doesn't work in the Android emulator? From the browser I have access and the server is internal. All I can think of is that I'm missing some configuration on my app so it can access the network layer. try { InetAddress server = Inet4Address.getByName("thehost"); //Doesn't work either //or InetAdd...

Pacman in Java questions

For my university assignment I have to make a networkable version of pacman. I thought I would best approach this problem with making a local copy of pacman first and then extend this functionality for network play. I would have to say that I am relatively new to java GUI development and utilizing such features within java. http://ww...