tcpip

TCP Operation Timed Out

I've got a TCP server and client written in C that opens up a connection that should be open forever. On the first send, errno returns 0 which is fine. On subsequent sends it gives me an errno 60 which is that the operation timed out. The packet is still recieved by the server though and nothing seems to be wrong. What could cause the th...

Deserializing data sent via TCP

Hi, I have problem with sending objects via TCPClient. At first, I serialize them into byte array and then I send them. TCPListener recieves some data, but deserializer is throwing exception "Unexpected end of stream". Here is reciever code: public void start() { TcpListener listener = new TcpListener(IPAddress.Any, 80...

How do I make a TCP server work behind a router (NAT) without any redirection configuration needed.

The scenario is the following. I have two machines A and B: A: Client (behind NAT) B: Server (behind NAT) I want B to be able to listen on any given port, so that A can send packets to B through that specific TCP port and receive any response. If both machines are not behind a NAT it is pretty straight foward process. However how do I m...

Maximum number of concurrent TCP/IP connections - Win XP SP3

Does anyone know what is the maximum number of concurrent TCP/IP connections on Windows XP SP3? I am trying to load test a machine and would like to know what is the max number of tcp connections that can be opened by an application (in my case, java application) towards that machine. ...

How to control TCP_NODELAY setting for Scala remote actor ?

I'm using Scala's remote actors, but round-trip time (even of a trivial message) is 80ms, presumably due to underlying socket not having the TCP/IP Nagle algorithm disabled (also known as TCP_NODELAY), or at least that's what someone with some experience with Java RMI informs me. All I'm doing in the client to get a link to the remote a...

Unable to make 2 parallel TCP requests to the same TCP Client

Error: Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall Situation There is a TCP Server My web application connects to this TCP Server Using the below code: TcpClientInfo = new TcpClient(); _result = TcpClientInfo.BeginConnect(<serverAddress>,<portNumber>, nu...

Sniffer for localhost (Windows OS)

I am looking for a sniffer that can work with the loopback address in Windows. So far, I found Microsoft Network Monitor which is a nice tool, but for localhost it's useless because on Windows, localhost packets don't pass through the regular network stack, so they're invisible to an ethernet sniffer like MS Network Monitor. How do you...

Corruption in the network stack

Hi, What could cause WireShark to show (example) 'xxxxxxxxxxx' on the sending machine, and then show 'xxxxxxxxxii' on the receiving machine? Note that it's not WireShark showing wrong data, the data is actually corrupted when it arrives, causing our TCP/IP protocol to get out of sync. This is not the real data sent, but this is the pa...

TCP/IP Message Framing Examples

Hello, I'm trying to find concrete examples of how to manage breaking an incoming stream of data on a TCP/IP socket and aggregating this data in a buffer of some sort so that I could find the messages in it (variable length with header + delimiters) and extract them to reconstruct the messages for the receiving application. Any good po...

how to modify this code to include logging of ip address to another file

please look at the simple php webpage code below how can modify my code so that a log file is created on my server which logs each visitor's ip and whether it was successfully redirected to the correct page . something like that. <?php $a = $_SERVER['REMOTE_ADDR']; if ( $a == "117.96.112.122" ) { header("Location: ad_sams_...

Optimum programming language to implement server using tcp/ip socket

Hi, What could be the optimum programming languages (Perl, PHP, Java, Python or something else) to implement server (multi-threaded?) using tcp/ip socket serving like 1000's of clients with the streaming data? Thanks Vishal ...

How to create simple C# full-duplex TCP/IP stream socket connection?

How to create simple C# full-duplex TCP/IP stream socket connection? What do I need? I need - Open Source Libs Tutorials Blog posts/Articles ...

full-duplex TCP/IP stream socket connection vs PollingDuplexHttpBinding vs WSDualHttpBinding

full-duplex TCP/IP stream socket connection vs PollingDuplexHttpBinding vs WSDualHttpBinding I want to know - What is same What is different Some comparing tables Some articles Where what can\cannot be used etc. ...

Programmatically Changing NameServer in Windows TCP/IP

Hello, I am building a VPN application where I need to set DNS server programmatically. I am changing NameServer parameter in the registry (in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces) to prepend a name server to the list of existing entries. Once I do this, if I try to look up a host name using ns...

How to force a Http HEAD command to terminate (for HttpClient and curl) ?

If you run this command: $ curl -XHEAD -i -H "User-Agent: myuseragent" http://www.google.com HTTP/1.1 302 Found ... snip ... Server: gws Content-Length: 222 X-XSS-Protection: 0 you will notice immediately that the curl command hangs. (I am running this in cygwin/VISTA) If you run it against twitter or facebook, curl terminates immed...

How can I establish a TCP connection between many computers behind two firewalls?

I'd like to establish several TCP connections between computers behind a firewall. The follow picture illustrates a simple network: From the picture I'd like to establish 3 TCP connections: A => 2 B => 2 C => 2 What are my options for establishing these TCP connections? and Can I do this without port forwarding? ...

Private Network (as in IPv4) question

I am working on an embedded TCP/IP4 stack and HTTP/SNMP/SMTP stuff. It functionally works but I want to make it work faster on LAN. Because of the Nagle's Algorithm and the delayed TCP-ACK, The HTTP application seems to work slow even on LAN. As can be seen on http://en.wikipedia.org/wiki/IPv4#Private_networks , There are 3 different Pr...

How to use simple TCP/IP sockets connection over Net.TCP WCF binding?

How to use simple TCP/IP sockets connections over/with Net.TCP WCF binding? Idea is – We have a web service with Net.TCP binding on some URL, port. We want to take advantage of the WCF address model and simplicity of socket connections. So can we use simple TCP/IP sockets connection over/with Net.TCP WCF binding? If yes. What do I ne...

How many open udp or tcp/ip connections can a linux machine have?

There are limits imposed by available memory, bandwidth, CPU, and of course, the network connectivity. But those can often be scaled vertically. Are there any other limiting factors on linux? Can they be overcome without kernel modifications? I suspect that, if nothing else, the limiting factor would become the gigabit ethernet. But for ...

SLES 9 vs. SLES 10

Are there any important change in how SLES 10 implements Tcp sockets vs. SLES 9? I have several apps written in C# (.NET 3.5) that run on Windows XP and Windows Server 2003. They've been running fine for over a year, getting market data from a SLES 9 machine using a socket connection. The machine was upgraded today to SLES 10 and ...