network-programming

How to find programmatically out S/N ratio of a network?

Hi, I have a MANET and am writing an application which will be running on the base station and plugged into the TCP network. I wanted to know how can I figure out the signal-to-noise ratio of a selected node in the MANET? The GUI is based on Qt and I am also using BOOST which I don't have much experience with. I don't know where to st...

Developing client app for proprietary server

Hi, I was thinking about developing an app that enables the user to remotely check the progress of a longrunning task. The server application running the task is an existing commercial tool and comes with a proprietary client to connect to the server to manage it. However, the client is available only for windows computers and not for m...

what should i learn and look for if i like to build traffic shaper and analizer

i like to add and build something like WIPFW but with traffic shaper option what should i learn in windows driver programing ? is there any code wrappers that can make it easier to program drivers stuff? ...

C# byte streams through TCP

I'm a Jr. Engineer hoping to seek some advice from all of the experienced people in here in regards to how to approach this. I've been assigned a project to create a server/client application that does byte streaming through TCP. Our company deals with 2-way radios with GPS with a dispatch software and we would like to make a server/cl...

Reading data send from StreamRequestHandler write

I have a SocketServer.StreamRequestHandler server that calls self.rfile.readline() to read a request and then calls self.wfile.write(data) to send back some data: class FileServerHandler(SocketServer.StreamRequestHandler): def handle(self): # self.rfile is a file-like oject created by the handler data = self...

data loss when file is transfer from server to client using stream in c#

server side stream.BeginWrite(clientData, 0, clientData.Length, new AsyncCallback(CompleteWrite), stream); client side int tot = s.Read(clientData, 0, clientData.Length); I have used TCPClient,TCPlistener classes clientData is a byte array.Size of ClientData is 2682 in server side.I have used NetworkStream class to write d...

java statistics collection for performance evaluation

What is the most efficient way to collect and report performance statistic analysis from an application? If I have an application that uses a series of network apis, and I want to report statistics at runtime, e.g. Method doA() was called 3 times and consumed on avg 500ms Method doB() was called 5 times and consumed on avg 1200ms et...

Portable C++ approach to listing all adapter IPv4 addresses?

I want to generate the list of IP addresses on the local machine using C++. I looked at boost and it doesn't seem to have any function to do so. I need this because I want to see if the host name/IP address entered by the user is for the local machine. ...

WCF discovery finds the endpoint but the address is localhost

Hi, I have a wcf discoverable service called "GetNameService" which is hosted on a PC @ 10.0.0.5:8732. It is hosted with wsHttpBinding and is discoverable thru' UdpEndpoint. I also have a client @ 10.0.0.9 which discovers for such services in the same network. When I ran the client, I am able to discover the service but the end point o...

In c# client/server program Data that sent from server is changed when received at client

Server side code: byte[] size = new byte[4]; size = BitConverter.GetBytes(fileData.Length); stream.Write(size, 0, 4); Client side code: byte[] size = new byte[4]; ReadWholeArray(s, size); int fileSize = BitConverter.ToInt32(size, 0); Definition of ReadWholeArray method: public static void ReadWholeArray(Stream stream, byte[] data)...

How to request a URL that requires a client certificate for authentication

Hi, I need to request a URL from a server that uses client certificates for authentication and can't find a way to do this for my application. My problem is that the Java client I'm working on has the certificate file available locally but due to restrictions on the PCs it will be running on it cannot install the certificate in a keyst...

Tell whether a text string is an IPv6 address or IPv4 address using standard C sockets API

I have a program where an external component passes me a string which contains an IP address. I then need to turn it into a URI. For IPv4 this is easy; I prepend http:// and append /. However, for IPv6 I need to also surround it in brackets []. Is there a standard sockets API call to determine the address family of the address? ...

detecting LAN connectivity with SENS

Using the SENS service combined with COM+, I am able to perfectly detect modem status, but no chance with LAN, Isn't ISensNetwork method ConnectionMade() supposed to detect LAN connectivity as well? Should I implement a thread that keeps asking? In a previous question, I was unable to use NetworkAvailabilityChanged to detect connec...

c udp chat testing

I am writing a udp chat application in c. I need to test if messages are received in an incorrect order. CAn anyone please tell me of a tool I can use to delay certain messages? also please tell me how to use it? thank you very much in advance! also I am using ubuntu x86_64 and OSX 10.6.4. A tool in either OS will work ...

Event Handling in Threading Architecture Issue

I am dealing a big situation in architecture design flaw in multiple threading. I try to keep my application completely thread safe and avoid conflict with each others. The problem I was aware was this: Assume there are two threads, Thread A and Thread B. Thread A is something that you'll see from Static Void Main method as the only t...

Self-signed SSL certificates and stringWithContentsOfURL

I am requesting some data from a server with NSString#stringWithContentsOfURL:. The server is using a self-signed certificate, so stringWithContentsOfURL: simply returns nil and does not give a change to accept the certificate. This is all expected behaviour. I know how to properly do this with NSURLConnection and it's delegate methods ...

Threads for peer to peer communication

I am trying to make a multi-player network game. Each player is represented by a rectangle on the screen. I am using OpenGL for the graphics and also the user input (commands like MOVE-LEFT, MOVE-RIGHT etc ) will be handled by it (or GLUT or sumthing). I have the following architecture for the game. There are 4 players(nodes) in the g...

Writing a simple email server

What would be a good starting point for me to learn about creating an email server? Basically, what I want to do is have a server (such as foo.com) recieving mail for me so if I send an email to ([email protected]) it will dump the contents of the email into /mail/blah/subject and then send it off to my REAL email account. I'm looking to do...

in_addr_t to string

Hello, I have an IP address stored in in_addr_t and I want to create the string representation of this data type, ie in_addr_t to 10.0.0.1. How can I do that? ...

Using BSD socket with specific IP address

I have the requirement to make connections from server that actually plays a client role while using different IP addresses depending on call type policy. Details: 1. The OS is Linux (Debian). 2. There is 1 network card + 3 aliases 3. The call activity from my server may looks like: My server ('client' role) calls: * c...