networking

Simulating high latency / intermittent network connections

I'm load testing a network application using The Grinder (on a Windows PC) and I wish to simulate imperfect network conditions in order to see what effect is has on the application load, in particular I'd like to see the effect of: Variable network latency, so not only do different clients have different latency, but also latency may v...

c++, boost: how to fill buffer and transfer (image) file data over network ?

Hi! I'm working on an application where I need to send a "filename", "filesize" and the filedata over the network. I created a server using boost which, for now, reads in the filesize and name. I'm wondering how I can fill a buffer with the file data (if necessary) and how to transfer it to the server. This is what I've got now: #i...

WinINet asynchronous mode disaster

Sorry for such a long question. It's just I've spent several days trying to solve my problem, and I'm exhausted. I'm trying to use WinINet in an asynchronous mode. And I must say... this is simply insane. I really can't understand this. It does so many things, but unfortunately its asynchronous API is so much poorly designed that it jus...

How to determine the length of an Ethernet II frame?

Hello, the Ethernet II frame format does not contain a length field, and I'd like to understand how the end of a frame can be detected without it. Unfortunately, if have no idea of physics, but the following sounds reasonable to me: we assume that Layer 1 (Physical Layer) provides us with a way of transmitting raw bits in such a way th...

What's the best way to (programatically) determine a file's network origin?

For an application I'm writing, i want to programatically find out what computer on the network a file came from. How can I best accomplish this? Do I need to monitor network transactions or is this data stored somewhere in Windows? ...

networking program crashes

hey guys, i got this code from http://www.evolt.org/node/60276 and modified it to listen for a single "1" coming from the other side but whenever i run this program it stops and python IDLE goes to non-responding on "data1,addr = UDPSock.recvfrom(1024)" def get1(): # Server program, receives 1 if ball found # ff1 is file w/ received da...

TCP vs UDP for Microprocessor Communication

I am using TCP for communicating with an arduino (just open a socket and wait for a connection)using an ethernet shield, While watching/reading about various other project that use some sort of network interface for communication they all seem to use UDP instead of TCP for communication. What I was wondering is what would be my gain if I...

How can we troubleshoot intermittent "An existing connection was forcibly closed by the remote host" errors when remoting

We have the "standard" three tier architecture with our middle tier hosted in IIS and accessed via .net remoting. These errors occur between our web and web services servers (front tier) that are remoting to the app servers (middle tier). We'll get this error 3-10 times a day out of ~130K total calls in the day. The exception and stac...

Android emulator networking across network

So I have an android application that needs to connect to a socket server. That's simple enough if the socket server was running on my development machine. However the socket server is running on a server not only not on my own machine, but on a different subnet. How would I connect my emulator to the socket server? I understand how the ...

Keep Track Of Ajax Request

Hi, Newbie here.. I just want to ask how can I accomplish my homework in school. I basically have this need. I want to send an ajax request every 10 seconds but I dont want to initiate another request if my previous request has not returned yet. I am thinking that the connection to DB might be that bad sometimes so I would like to ...

How can I send a datagram with an Ethernet trailer?

How can I send a datagram with an Ethernet trailer? If I use SocketType.Raw, I'll have to send the whole IP header and I have no idea how to do that. Here's a picture that will explain this better: As you can see, there's no data. The "00 00 00 00 ..." is the trailer. Thanks. EDIT: I removed the language requirement, added a WireS...

Android max ping size less than 64K

Hi, doing some tests with my ADP1 (version 1.6) I noticed that the maximum ping that I can send when it's connected with wifi (ad.hoc or with a router) is of 57740 bytes, shouldn't be 64K? I think it's related with the receiving buffer, do somebody know how to modify it or how to get information about it? ...

How to guess maximum possible outgoing bitrate for a NetStream with RTMFP for Flash?

Hi there, I've setup a sending NetStream connection in Actionscript 3 for Flash. I would like to automatically select the highest possible encoding quality for transmission. To do so, I need to get the approximate possible outgoing bitrate (the "upload" speed) and then choose the corresponding quality. My question is, how do I approxi...

Alternatives to NSHost in iPhone app

I'm currently using this code NSHost *host = [NSHost hostWithAddress:hostname]; if (host == nil) { host = [NSHost hostWithName:hostname]; if (host == nil) { [self setMessage:@"Invalid IP address or hostname:"]; return; } } to retrive my IP Address for a networking app I'm working on, however I'm aware t...

I have an idea for a security protocol!

Ok guys, So I was watching inception yesterday and I had this idea. I dont know too much about network security or the internet really. So thats what you guys are for, tell me if this is secure or even possible.Its to send secure data over the web by the way. My Ideas takes the data needed to be send and encrypts it. The data is then sp...

Determine how much time does a webpage take to load on user's machine

I want to measure the user perceived experience of web page loading. It is not sufficient to measure the time between receiving request and sending the response. Because that would be the server response time. The user's experience would depend on network latency and his bandwidth in addition to server response time. Any idea? The web p...

What factors other than latency and bandwidth affect network speed?

I have noticed that viewing images or websites that are hosted on US servers (Im in europe) is considerably slower. The main reason would be the latency because of the distance. But if 1 packet takes n milliseconds to be received, can't this be alleviated by sending more packets simultaneously? Does this actually happen or are the pack...

tcpip 3-way handshake

Why is data not transferred during the 3rd part of TCP 3-way handshake? e.g. (A to B)SYN (B to A)ACK+SYN (A to B) ACK.... why cant data be transferred along with this ACK? ...

When will one socket suffice, when do I need to create more?

The "connectionless" aspect of UDP has thrown me for a loop... If I setup a UDP socket set to INADDR_ANY, then bind that to port 33445 on the local machine, the machine will accept incoming connections from various clients. All of these connections will be serviced by that one socket, since this is not TCP and I cannot spawning a new c...

WinPac-8000 OPC-server network access

Hello. I am to build an automation solution based on WinPac-8000 controller (http://www.icpdas.com/products/PAC/winpac/introduction.htm). I split this project into 2 programs: 1st is running on the controller (it does some business logic) and second operates on user machine (it displays current results). The problem is: I use build-in ...