network-programming

What component do I need to monitor my internet traffic on my PC?

I would like to be able to see and monitor my internet data (http/emule/email) on my own PC using Windows XP. I am thinking of something like WireShark but I would like to control it programmatically. I would be using C or C++. How can I do this? ...

First packet to be sent when starting to browse

Imagine a user sitting at an Ethernet-connected PC. He has a browser open. He types "www.google.com" in the address bar and hits enter. Now tell me what the first packet to appear on the Ethernet is. I found this question here: http://stackoverflow.com/questions/177197/interview-questions-on-socket-programming-and-multi-threading As I...

Network Communication Design Patterns

I've come to realize that several questions I asked in the past, such as this really boil down to a more fundamental question. Are there any well known design patterns for network communications and by virtue of it's nature, protocol construction/parsing? A google search has not revealed much. Note that i'm not looking for solutions f...

Where to store preferences under Windows in a networked application?

Where should I store preferences and setting if my goal is that my app should be runnable from a network share and the user's settings should persist regardless of the exact machine he is logged in on at the time? Similarly, where should I store application wide settings? The development environment in use is not .Net but can compile a...

Twisted in Java

What is the closest Java alternative to Twisted? ...

How to make use of full bandwidth?

Using WinPcap I crafted a series of custom UDP packets and injected them into the Ethernet layer. I sent 1000 packets, 1440 bytes each. It takes 2.1 sec for 100 Mbps bandwidth. How do I make use of full bandwidth? ...

Determine the IP Address of a Printer in C#

Hi, I would like to determine the IP address of a printer, using C# (.NET 2.0). I have only the printer share name as set up on the Windows OS, in the format \\PC Name\Printer Name. The printer is a network printer, and has a different IP address to the PC. Does anyone have any pointers? Thanks in advance for your help. Regards, Andy....

TCPClient vs Socket in Csharp

I don't see much use of TCPClient, yet there is a lot of Socket? What is the major difference between them and when would you use each? I understand that .net socket are written on top of WINSOCK, and TCPClient is a wrapper over Socket class. Thus TCPClient is way up the chain, and possibly inefficient. Correct me if I am wrong. Than...

How do you determine if an IP address is private, in Python?

In Python, what is the best way to determine if an IP address (e.g., '127.0.0.1' or '10.98.76.6') is on a private network? The code does not sound difficult to write. But there may be more edge cases than are immediately apparent, and there's IPv6 support to consider, etc. Is there an existing library that does it? ...

Arithmetic with IPv6 addresses (large integers)

I'm working with IPv6 addresses in the form: FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF Internally, I store them in an array: TIp6Bytes = array [0..15] of Byte; I need to manipulate the IPv6 addresses in a number of ways including adding, dividing, multiplying etc. Can anyone suggest a good way to do this? I guess I should have mentio...

Java serialization over network

Just want to know if there's a tutorial or an how-to for serializing object, put it in a stream over network, and deserialize it on the other point. I understand the principles of serialization, I/O, streams, sockets and so on, just want an example (client sending object to a server) to start with. Thank you. ...

readv(), writev(), WSARecv(), WSASend()

Hi everyone, I hope you can help me out. I'm trying to send packets of 1000 bits across a network via TCP/IP and I was hoping to be able to use the Overlapped I/O technique in both Cygwin and Windows as well. In Cygwin, I am trying to use the "readv() and writev()" function calls to send 1000 bits across while in Windows, I am tryin...

Master-Slave control architecture in .net across multiple systems.

I've been analyzing my next project and writing up requirements, one of the things I'd like to do involves me communicating over 64 serial ports (16 ports x 4 windows pc's) The best was I can think to do this is a master/slave application model where the master application is controlled by an operator and the slaves simply execute comma...

Applying a regular expression to a Java I/O Stream

I seek an example of applying a regular expression to a Java I/O stream that doesn't simply convert the stream to a string as I would like to preserve binary data. Most of the examples on the Internet focus on text data... ...

Comparing HTTP and FTP for transferring files

What are the advantages (or limitations) of one over the other for transferring files over the Internet? (I am aware of secure forms of both protocols. I'd like to hear comparisons through personal experiences in terms of performance, reliability, file size limitations etc.) ...

How to receive ip multicast, using only one NIC

Hi, i have a problem here! I have server with multiple NICs, running windows server 2003. My application receive multicast packets, but now i need to receive multicast packets just from one single network interface. I think this can help, but i have some questions. ip_mreq mreq; mreq.imr_multiaddr.s_addr = multicast group address mr...

Static matrix or dynamic allocated matrix

I want to model a purification of the Petri Network. And i was given the suggestion to use a matrix which is allocated dynamically. After thinking about the problem i came up with a different approach like so: A static matrix of n transitions and p locations and a function which returns the purified matrix from the static matrix. Which...

How to connect my laptop and desktop for file sharing and internet connection.?

Dear all,, Well i fear to post this question here.. But this is only because i am not able to find the answer to this question anywhere.. But if the administrator still thinks that this question is not worth putting here, then he or she can delete it.. But i would be obliged if that doesn't happen and i get the answer to my question.. A...

Framework for Java RPC server

I'm planning on writing an RPC server in Java. The server needs to accept incoming RPCs - probably over HTTP - and answer them. Fairly basic stuff. Support for 'long polling' or 'hanging' RPCs isn't necessary, so a thread-per-request model ought to be perfectly adequate. If I were writing this in Python, I would probably use a framework...

More TCP and POSIX sockets listen() and accept() semantics

Situation: The server calls listen() (but not accept()!). The client sends a SYN to the server. The server gets the SYN, and then sends a SYN/ACK back to the client. However, the client now hangs up / dies, so it never sends an ACK back to the server. The connection is in the SYN_SENT state. Now another client sends a SYN, gets a SYN/AC...