tcp

Why is my Linux prio based tc not improving network latency?

Hi - I am building a real-time embedded linux application that has a variety of network traffic. Of the set of traffic, two connections are time critical. One is the input data and the other for output data. My application needs this traffic to have priority over the other, non-time-critical traffic. I care about two things: Min...

Which programming language should I use for TCP server for JavaScript clients?

Hi, I am asking for advise on which programming language is most acceptable for the following situation. The program will act as the server in a TCP networking application, serving JavaScript clients that output to the browser, using a pre-written framework. The server program will need to be 'always-on', and be capable of dealing wit...

When should I use TCP_NODELAY and when TCP_CORK?

Hi, I understood that both of them disable Nagle's algorithm. When should/ shouldn't I use each one of them? Thank you. ...

splice() from pipe to TCP buffered?

xpost from linuxquestions.org, sorry... I wrote a small test program to see if a simple proxy would benefit from using splice() but it always takes 200ms for the data that I spliced from a pipe to a TCP socket to be read from the other end of the socket. Here is the Perl program to test it: package test_pipes_2; use strict; use warnin...

SQL Exception on immediate reconnect

I have a winform app that uses LinqToSql as it's DAL. There is a Central SQL DB and each laptop has a local SQLExpress DB. A seperate module, using Merge Replication, keeps the two in sync. When connection is lost to the central DB it 'fails over' to the local. This works great. However, when I regain conection to the central db, if...

How do I generate a connection reset programatically?

Hi, I'm sure you've seen the "the connection was reset" message displayed when trying to browse web pages. (The text is from Firefox, other browsers differ.) I need to generate that message/error/condition on demand, to test workarounds. So, how do I generate that condition programmatically? (How to generate a TCP RST from PHP -- or...

Monitoring tools accuracy - Debugging application latency

Hello, we are having latency issues in one of our network application. Most of the time requests are being handled within 100ms. But sometime it can take up to a few seconds for no apparent reason. So I hooked up some monitoring tools and looked up what was happening (Wireshark to monitor the network externally through port replication ...

TCP Socket Connection Time Out with Volume Transactions

I am desperate to get some help on this one. We are getting issues when a volume of messages are sent through TCP Socket Connection on a different server for HSM Card validation. This is what we tested for volume testing: We tested with processing 3 blocks of 30,000 transactions at 15 trans/sec and at the third block transactions start...

Erlang gen_tcp:recv(Socket, Length) semantics

After reading this answer, I want to understand if the same applies to the calls to gen_tcp:recv(Socket, Length). My understanding of the documentation is that this if more than Length bytes are available in the buffer, they remain there; if there is less than Length bytes, the call blocks until enough is available or connection closes. ...

Good timeout for heartbeating proto using TCP - Java Sockets

Im implementing my own proto in Java, it will use a heartbeat over a TCP connection that I also use to transfer messages and files. For the client I am using blocking socket I/O. So here is how Im planning that will work... I will set the socket timeout for K seconds and make the heartbeat stay sending messages in an interval T, so that ...

How can I add encryption to my own TCP-based-Protocol using Java Sockets?

So, I have a working protocol that the Client needs to authenticate with user and password to login on the server. Then server and client would trade messages and files. It´s all working OK and I´m using Input/Output Stream for that. I need to add encryption to the conversation and user/password authentication too. I dont want to store a...

Using iOS device as TCP client - no Bonjour

I'd like to use iOS device as a TCP client, but I can't find an understandable API/guide/sample of how to do that. I tried SimpleNetworkStreams and PictureSharing, but they are both using Bonjour. I can make UDP connections easily, learned via UDPEcho, but I can't find as good sample as UDPEcho for TCP. I want a simple example of connect...

tcp reno, newreno and slow start

When packet loss occurs while in slow start, does the reno/newreno algorithms notice possible dupacks, or is it purely slowstart -> rto? Thus, if sending two packets (in start of slow start), and first one goes missing, does slow start do anything else but rto? It is confusing, since rfc states that 'in practice they (slow start & cong...

How to run more than 6 instances of a application on a single port in Windows 7/vista

Hi All, I have an application running on a different machine ....the application needs some info from a windows 7 machine, which is listing on a specific port. I need to run 64 instances of the application but vista is supporting only 6 instances over the specific port. How can I change this from 6 to 64 ... Thanks for your help....

Is there a way I can add Java Web Start service inside my server which uses my own TCP-based-protocol ??

I am building an applicaton in Java that will have some updates over time. This means that the client will have to download a new .jar and use it when available. I read about jws (java web start) and it works fine. But the problem is that my application uses a protocol I created, and it will just be able to connect to my server. It may n...

How can I perform network IO at the very end of a process' lifetime?

I'm developing a DLL in C++ which needs to write some data via a (previously established) TCP/IP connection using the write() call. To be precise, the DLL should send a little 'Process 12345 is terminating at 2007-09-27 15:30:42, value of i is 131' message over the wire when the process goes down. Unfortunately, all the ways I know for ...

Azure worker role becomes unresponsive after internal tcp connection with web role

I'm posting the question that first appears here because it seems that it is dead on the Microsoft forums. Plus, Stack Overflow is better. :-P I'm hosting a TCP endpoint in a worker role on Azure -- var _breadcrumbServiceHost = new ServiceHost(typeof(BreadcrumbService)); var binding = new NetTcpBinding(SecurityMode.None); var externalE...

Chat Server - persistent TCP or new Connection for each poll

Whats the best practice for scalable servers which need to maintain a list of active users? Should I open a persistent TCP Connection for each client on which the server sends update messages? This could lead in many open connection and propably no traffic for many seconds. Is this a problem in TCP? Or would it be better to let the Cli...

Strange error logging in to supplier site from Sony laptop

This one would have me tearing out my hair, if I had any. We need to log in to a site from an advertising supplier. From within our office LAN I see the following ... I have no issues logging in to this site from my desktop PC running XP, but my boss - who is the one who needs to log into this site, cannot. On my boss's system, which ...

Guarantee TCP Packet Size

We use an embedded device to send packets from a serial port over a serial-to-Ethernet converter to a server. One manufacturer we use, Moxa, will always send the packets in the same manner which they are constructed. Meaning, if we construct a packet size of 255, it will always send the packet in a 255 length. The other manufacturer, Tib...