tcp

Bi-Directional Communication using C# TCP Channels

Is there a native way to implement the features provided by the Genuine Channels (http://www.genuinechannels.com) component? Essentially, it provides the same features as the .net remoting component, with the only difference being .net remoting is unidirectional. I am looking for something where, as a client, I could connect to a server,...

Do I need to heartbeat to keep a TCP connection open?

I have two components that that communicate via TCP/IP. Component A acts as a server/listener and Component B is the client. The two should communicate as quickly as possible. There can only ever be one connection at any time (though that is aside to this question). A senior developer at my company has said I need to use application ...

db connection in python

I am writing a code in python in which I established a connection with database.I have queries in a loop.While queries being executed in the loop ,If i unplug the network cable it should stop with an exception.But this not happens ,When i again plug yhe network cabe after 2 minutes it starts again from where it ended.I am using linux and...

How to write a scalable Tcp/Ip based server

I am in the design phase of writing a new Windows Service application that accepts TCP/IP connections for long running connections (i.e. this is not like HTTP where there are many short connections, but rather a client connects and stays connected for hours or days or even weeks). I'm looking for ideas for the best way to design the net...

Mutual exclusion and C Sockets

I am maintaining an existing system where previous developers on each operation is performed on the socket, to which multiple threads are required to read and write to, the previous developers have performed the io operations under the control and a mutex. is there a requirement to mutually exclude C socket IO operations? Or since socke...

C# client-server protocol/model question

I am trying to conceptually work through a model for a client-server socket application I am writing in c# (both client and server). My server will need to handle many clients at once, and preferably multiple requests from a client at once. I have worked out a container for my communication where I will send a fixed length header at t...

How to find the largest UDP packet I can send without fragmenting?

I need to know what the largest UDP packet I can send to another computer is without fragmentation. This size is commonly known as the MTU (Maximum Transmission Unit). Supposedly, between 2 computers, will be many routers and modems that may have different MTUs. I read that the TCP implementation in windows automatically finds the max...

Determine whether or not a TCP/IP port is already in use under Windows?

The cross platform dev environment I use has a built in function that is supposed to indicate whether or not a tcp port is available. However, the function malfunctions under Vista and always returns "available". Is there an easy way, such as a dll function, I can use to correctly determine this information without needing .Net? ...

Is it possible to connect iPhones through NAT traversal techniques over 3G for peer 2 peer gaming

Is it possible to connect an iPhone to another iPhone or any other network client talking that game's protocol. I was thinking that I could use the same NAT Traversal technique used in the XBox 360 to host games on users XBox's through Firewalls. For NAT traversal to work effectively I'd have to have a central server that would allow c...

Best Game network programming articles and books

What are good resources for the latest in Game network programming. I'm looking for something that's not the traditional business software network programming, talking about RPC and clients making calls to the server. I'm looking for techniques and articles on the latest in Game simulation network programming. I'm looking for techniques...

Error Rate in TCP checksum?

TCP and UDP(sometimes) use a simple checksum to make sure the contents are correct. What I want to know is any empirical data or estimate, of how often a packet is corrupted, but has the correct checksum for a person with a standard computer and internet connection. Now I know that this probably all varies widely with ISP quality, har...

Optimizing protocol opening operation over tcp connection opening

I'm designing a new protocol called DITP. It is a connection oriented protocol that would use TCP as transport layer. With common Internet protocols, when the TCP connection is established, the server starts by sending a greeting message to what the client respond, eventually sending its first request. I figured out I could save one rou...

NIO Server not able to listen to client

Hi I am trying to implements a simple Java NIO server; which registers the socketChannel with the selector. Hence I wish to listen to client and send some response back. After the socketChannel is registered with the selector, even if client(non NIO) sends some data, Server is not able to read; howerver the key generated is still being i...

Why does TCP header contain both ACK and SEQ fields?

Since TCP header is a relatively large overhead, why don't we compress it in the way that ACK and SEQ share the same field, and they can still be distinguished by flags in the header? ...

How to concatenate two tcpdump files (pcap files)

How to concatenate two tcpdump files, so that one traffic will appear after another in the file? To be concrete I want to "multiply" one tcpdump file, so that all the sessions will be repeated one after another sequentially few times. ...

What is ISCL in terms of TCP

What is ISCL in terms of TCP ...

Scaleability of TCP keep-alive

Consider a large scale, heterogeneous network of various devices. These devices are providing services to others on the network in a peer-to-peer fashion. The mechanism used to track service availabilty across all nodes is currently using TCP sockets marked as keep-alive, usually for the duration the node is online. This leads to ever...

What libraries are available for Java that parse IP header bytes?

On my project, we have been writing our own IP header parsing code for some time now. I'm starting to wonder if our time could be spent better elsewhere. A google search has not yielded much of use. Basically, what I am looking for is a third party library that will be able to parse out all of the meaningful information out of a IP pack...

sending messages over tcp with priority in C#

I am developing a chat protocol in C# and I want several types of messages sent on the same connections, for example, text and application(eg file transfer) messages. Because applications may easily fill the TCP buffer, text messages may have a big delay until they sent, so I want them to have a certain priority over other messages. //p...

How do RDBMS deal with stale connections ?

Consider setting up a connection to a RDBMS, then yanking the network plug. (You'll get the same effect if the connection goes through a NAT gateway, and the gateway decides to purge that connection.) At that point the RDBMS server is waiting for a query, or whatever, which will never occur. And the TCP connection won't be closed by th...