network-programming

Bi-directional communication with 1 socket - how to deal with collisions?

Hi, I have one app. that consists of "Manager" and "Worker". Currently, the worker always initiates the connection, says something to the manager, and the manager will send the response. Since there is a LOT of communication between the Manager and the Worker, I'm considering to have a socket open between the two and do the commun...

How to maintain a persistant network-connection between two applications over a network?

I was recently approached by my management with an interesting problem - where I am pretty sure I am telling my bosses the correct information but I really want to make sure I am telling them the correct stuff. I am being asked to develop some software that has this function: An application at one location is constantly processing rea...

How to connect / disconnection connection on windows XP / 2K with c#

Hi, I have to control a network connection located in the Network folder in Windows XP. How can I do that with C# ? I have found some method to enable or desable the adapter but it is not my case. Thanks in advance ! ...

C# Asynchronous Network IO and OutOfMemoryException

I'm working on a client/server application in C#, and I need to get Asynchronous sockets working so I can handle multiple connections at once. Technically it works the way it is now, but I get an OutOfMemoryException after about 3 minutes of running. MSDN says to use a WaitHandler to do WaitOne() after the socket.BeginAccept(), but it do...

TCP Slow Start, Congestion Avoidance & Determining Bandwidth

Is there a formula someplace which can be used to determine the minimum number of segments / bytes which need to be transfered across a TCP connection to determine it's bandwidth and which takes into account Slow Start and Congestion Avoidance? I'm aware of the pathrate tool, but I want if possible something a bit simpler that I can inc...

Low Throughput on Windows Named Pipe Over WAN

I'm having problems with low performance using a Windows named pipe. The throughput drops off rapidly as the network latency increases. There is a roughly linear relationship between messages sent per second and round trip time. It seems that the client must ack each message before the server will send the next one. This leads to very po...

Problem with a blocking network task

Hello everyone. I'm new in Java so please forgive any obscene errors that I may make :) I'm developing a program in Java that among other things it should also handle clients that will connect to a server. The server has 3 threads running, and I have created them in the following way : DaemonForUI du; DaemonForPort da; DaemonForCheck ...

Are there any modern platforms with non-IEEE C/C++ float formats?

Hi all, I am writing a video game, Humm and Strumm, which requires a network component in its game engine. I can deal with differences in endianness easily, but I have hit a wall in attempting to deal with possible float memory formats. I know that modern computers have all a standard integer format, but I have heard that they may not...

Need a good website URL to test against

I need a URL to just test basic http connectivity. It needs to be consistent and: Always be up Never change drastically due to IP or user agent. (IE: 301 Location redirect/ huge difference in content... minor would be tolerable) The URL itself has a consistent content-length. (IE: it doesn't vary from by 2kb at most, ever) A few exam...

How to choose which Network interface to use?

I use Qt for my TCP communication. If my PC has 2 network interfaces (say eth0, eth1), and say I want to explicitly use eth1, how do I do that in Qt? ...

How can I edit a js file sent by the server before it gets to my browser?

During a normal browsing session I want to edit a specific javascript file before the browser receives since once it gets there it's impossible to edit. Is there are any tool for this? For what I need it I can't just save it and edit it on my disk. I'm ready to learn how to program it myself but if anyone can point out more or less what...

What's a way for a client to automatically resolve the ip address of a server?

The project I am working on is a client/server architecture. In a LAN environment, I want the client's to be able to automatically determine the server's address. I want to avoid having to manually configure each client with the ip address of the server. What is the best way to do this? Some alternatives I have thought about doing ar...

Can a client determine whether the server has accept()'d a unix socket?

I'm dealing with a buggy server that will sometimes fail to accept() connections (but leaves its listening socket open). This is on Linux with unix domain sockets. Currently the only way to detect this is that after sending a bunch of data, the buffer fills up and blocks, and the server isn't sending any replies. This long-after-the-fac...

c# Network Programming - HTTPWebRequest Scraping

Hi, I am building a web scraping application. It should scrape a complex web site with concurrent HttpWebRequests from a single host to a single target web server. The application should run on Windows server 2008. One single HttpWebRequest for data could take from 1 minute to 4 minutes to complete (because of long running db operatio...

paket drop and splits in udp tunnel

hi guys ! Currently I am working on video conferencing project.For this i m using pwnat for nat traversing. pwnat is based on udp tunneling.I m using the TCP connection for data transmission. My problem is that when i send a packet , it does not reach properly at its destination side . Sometime it drops the packet and many times it...

Network programming and Packets interactions.

Greeting, This month I will start working on my master thesis. My thesis's subject is about network security. I need to deal with network interfaces and packets. I've used shappcap before to interact with packets but I'm not sure if C# is the most powerful language to deal with network programing and packets. I worked a bit with wire...

C#.Net Network tool to Listen to IP traffic and Sort them with predifined data

Hi I'm developing a network tool and I want to map IPs to Area Names. Ex: 10.0.0.1 - 10.0.0.100 = area A 10.0.0.101 - 10.0.0.200 = area B etc. And when a request comes from a certain IP the tool should display the Area Name to the user. I'm doing it on C#.Net Can anyone give me the outline of the software I should build.. Follo...

What kind of socket server protocol is efficient?

When I was writing a simple server for a simple client <> server multiplayer game, I thought of the following text-based protocol using a translation library. Basically, each command had a certain meaning, eg: 1 = character starts turning right 2 = character starts turning left 3 = character stops turning 4 = character starts moving for...

SIMPLE OpenSSL RSA Encryption in C/C++ is causing me headaches

SOLVED: I was dumb. First argument of encrypt should have been key.size() and first argument of decrypt should have been RSA_size(myKey). Hey guys, I'm having some trouble figuring out how to do this. Basically I just want a client and server to be able to send each other encrypted messages. This is going to be incredibly insecure bec...

my realtime network receiving time differs a lot, anyone can help?

I wrote a program using tcpip sockets to send commands to a device and receive the data from the device. The data size would be around 200kB to 600KB. The computer is directly connected to the device using a 100MB network. I found that the sending packets always arrive at the computer at 100MB/s speed (I have debugging information on the...