tcp

TCP Flow control in AS3?

I am currently working on a Flash socket client for a pre-existing service/standard. The service uses TCP flow control to throttle itself and the Flash socket is reading in everything as fast as it can despite not being able to process it as fast as it's being taken in. This causes the bytesAvailable on the socket to keep increasing an...

Updating data in a client application, how to avoid polling?

I have a desktop client application that is talking to a server application through a REST API using simple HTTP posts. I currently have the client polling every X minutes, but I would like the data to be refreshed more frequently. Is it possible to have the server notify the client of any new data, or is that outside the scope of what a...

How can I accept multiple TCP connections in Perl?

I have a problem with Perl script for Linux. It's main purpose is to be middleman between 3 applications. What it should do: It should be able to wait for UDP text (without spaces) on $udp_port When it receives that UDP text it should forward it to the TCP client that is connected Problem is my app currently works until the first t...

Receive buffer size for tcp/ip sockets

What's the maximum data size one should expect in a receive operation? The data that has to be sent is very large, but at some point there will be packet fragmentation I guess? ...

Redirecting TCP-traffic to a UNIX domain socket under Linux

Assume a legacy Linux application listening on a UNIX domain socket /tmp/foo. In addition to communicating with this legacy application over the UNIX domain socket mechanism I want to be able to connect to it via a TCP-connection on port say 1234. What is the easiest way to bind to TCP port 1234 and then redirect all incoming connectio...

WCF Integration with Legacy Remoting Client

I am facing a problem. Please explain if this is possible or not. 1)I created a Service Library (.Net 3.5) 2)Created a Windows Service (.Net 3.5), added ServiceHost and implemented my ServiceLibrary to work as a TCP Endpoint. 3)Next I created a Console Client (.Net 3.5) and tried to get data from my TCP Endpoint…(svcutil….proxy.cs ...

Socket close in java

I have a socket tcp connection between two java applications. When one side closes the socket the other side remains open. but I want it to be closed. And also I can't wait on it to see whether it is available or not and after that close it. I want some way to close it completely from one side. What can I do? ...

I cannot change sql server's default port (1433)

I want to add another port to default 1433 port of sql server. So I opened the configuration manager, selected Protocols for MSSQLSERVER and then double clicked on TCP/IP to see its properties. Then I selected the IP Addresses tab and scrolled down right to the IPAll section. and then I change 1433 to 1433,1450 so that I could also conne...

When does a Java socket send an ack?

My question is that when a socket at the receiver-side sends an ack? At the time the application read the socket data or when the underlying layers get the data and put it in the buffer? I want this because I want both side applications know whether the other side took the packet or not. ...

Ruby Tcp Server class with non-blocking or mutlithread functionality

Hello Can't find any gem or class which can help to made a non-blocking/multithread server. Does anybody know where to find any ? ...

Is a return value of 0 from write(2) in C an error?

In the man page for the system call write(2) - ssize_t write(int fd, const void *buf, size_t count); it says the following: Return Value On success, the number of bytes written are returned (zero indicates nothing was written). On error, -1 is returned, and errno is set appropriately. If count is zero and the file ...

How is.NET's NetworkStream delimiting multiple messages in the same packet?

So I've been tasked with creating a tool for our QA department that can read packets off the wire and reassemble the messages correctly (they don't trust our logs... long story). The application whose communication I'm attempting to listen in on is using .NET's TcpListener and TcpClient classes to communicate. Intercepting the packets ...

Using Perl's readline , <> function with TCP socket and Signals

I'm using Perl 5.8.8 and trying to determine if Perl automatically and consistently restarts the readline function ( better known as <> ) if it's interrupted by a signal. I want to safely read newline '\n' terminated strings from a TCP socket using readline. In the section Deferred Signals (Safe Signals) it says: Restartable syst...

Decoding tcp packets using python

Hello I am trying to decode data received over a tcp connection. The packets are small, no more than 100 bytes. However when there is a lot of them I receive some of the the packets joined together. Is there a way to prevent this. I am using python I have tried to separate the packets, my source is below. The packets start with STX byt...

TCP programming with .NET

Hey, I'm having an issue with a socket programming job. I wrote a TCP client that sends commands via sockets/networkstream. I'm using Wireshark to look at the raw data that goes through the wires. Everytime I send a "command" (meaning I Flush() the networkstream), the Wireshark application tells me that the checksum in the TCP Header is...

binary coded decimals (BCD) put into a byte in C#

Hi I'm working on implementing a protocol tha tells me to put decimals from 0 to 160 into a single byte. I assume, since it doesn't specify what sort of BCD it wants, that I am to put one digit into the lower nibble and the other decimal into the higher nibble. Meaning I get 1 byte with a two-digit decimal. But how would any larger value...

The simplest way to check if host is online (listening on a port) in C#

What's the simplest way to check if anything is listening on net.tcp://localhost:8801/ Preferably using WCF ...

transmitted data scrambled, Wireshark cannot read

Hey, I'm having an issue with a TCP transmission using C# sockets. I wrote a test client/echo server program and tested what Wireshark can read out from the network. The data I send is precisely the data I get echoed back. The data I send is normal strings. However, when communicating with the actual server, I send a request and get a re...

sending multiple tcp packets in an ip packet

is it possible to send multiple tcp or udp packets on a single ip packet? are there any specifications in the protocol that do not allow this. if it is allowed by the protocol but is generally not done by tcp/udp implementations could you point me to the relevant portion in the linux source code that proves this. are there any implemen...

Sending a TCP packet to localhost in an ASP.NET Page on Win 2008 R2

We have a windows service running that listens on e.g. port 9999. Now we want to be able to send a TCP packet through an ASPX page to that service. Both the service and ASP.NET WebApp run on the same server. The problem is that this works fine on my dev machine (without IIS though, through Visual Studio Web Server) and on our older Win ...