tcp

Twisted transport.write

Is there any way to force self.transport.write(response) to write immediately to its connection so that the next call to self.transport.write(response) does not get buffered into the same call. We have a client with legacy software we cannot amend, that reads for the 1st request and then starts reading again, and the problem I have is...

Communication over WAN

Hi, I want to create app client-server in C# but not only in LAN. There it's easy: TcpListener, TcpClient etc. I want to make sth like in this e.g. On my comp is server that's waiting for a connection. Someone in another network has client. He begin connection, but...where...what is a IP of server? He see only ip of router. Any ideas?...

Missing bytes in sending files over TCP connection

Some bytes are missing when I'm sending files over TCP connection. Though there are times that file transfer is complete. Sending side: class SendFile extends Thread { Socket s; String toIP; String fileName; PrintWriter pw; BufferedReader br; String fromIP; String nextHopIP; String transferTime; int routingIndex; final int bufferSize ...

send multiple file over TCP with C# using TcpClient

hello, im trying to send multiple file over TCP using C# TcpClient, for a single file it works great, but when i have n files, it sends only the first one, here is my code SENDING FILES try { TcpClient tcpClient = new TcpClient(); NetworkStream networkStream; FileStream fil...

Sending Multiple files using Over TCP

how can i send multiple files over TCP with C#, all the samples on the internet sends only a sinle file, im looking for something like this, loop through files in a folder and sending over tcp, this is the client, server side i want to receive and save them to disk, ...

C# TcpListener and PHP socket/tcp client not communicating.

Alright so i have the tcp listener, and when i recieve a tcp client i pass it to a class which uses the Streadread/writers to communicate: EDIT::: I forgot to mention that, they connect to each other fine, but just wont read/write to eachother.. C# side: private StreamReader srReceiver; private StreamWriter swSender; pri...

Asynchronous socket, forced disconnection and reuse

Im writing an application which is going to act as a tcp listener for a single client. The client is a java applet and will periodically connect to the listener, send some data and then wait for a response. The code for the TcpServer class below has been largely lifted from an example provided by a more knowledgeable stackoverflow membe...

.NET Async TcpListener / TcpClient Question...

I'm at a bit of a loss as to how to properly implement the asynchronous methods for TcpListner and TcpClient int .NET. I've read over quite a few posts on hear and I believe I have the code to accept new clients on the server taken care of. Here is the code for acception new connections: Public Sub Start() m_oListener = New TcpLis...

Strange WCF net.tcp exception

I have a WCF client/service with net.tcp transport. When I turn on the WCF tracing on client side I am seeing the following errors in trace (see screenshot from service trace viewer). The strange thing is that WCF is handling and recovering this error and my client doesn't receive any exception and it continues to work. This exception ha...

Strategy for TCP star network peer connections

The networking application that I've written does TCP communication with N-1 (itself) other Machines in the List (N) of Machines participating in the system. Upon application startup the application currently picks a Random Delay time (1000-3000ms) before attempting to connect to each of its peer systems If Machine 1 attempts to Connec...

Do TCP connections get moved to another port after they are opened?

If a TCP socket server listens on port 28081 for incoming connections and then accepts a connection and start receiving data. Is the port that data is coming into still 28081 or does the port get changed. for example what port does the incoming data come to in the pseudo code below? Is it still 28081 or does the OS assign a new port?:...

Video stream over ethernet

Hi, I have several video servers connected to each other over 1Giga bit ethernet cable. Video clips can be send from one server to another or live broadcasting. What best protocol should I use (UDP, TCP...) to achive real time transfering of HD video frames? ...

Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host

i have an update server that sends client updates through TCP port 12000, the sending of a single file is successful only the first time, but after that i get an error message on the server "Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host", if i restart the update service on...

Real Life (yet simple enough for a beginer) Example of TCP and/or UDP Sockets

I have been attempting to learn tcp/udp for so long now, I am on the brink of giving up completely and never attempting it again, I have read every tutorial there is but can never get anything to work. Tutorials either stop once they tell me how to connect and dont explain how it can be used or do not provide enough source code. Is there...

Streaming over WCF using NetTcpBinding

I can successfully use WCF streaming to xfer data from a server to client on the same machine. However as soon as I deploy my server to another machine, I get errors of the nature "A call to SSPI failed: The target principal name is incorrect". Has anyone come across this. I tried to set SecurotyMode.None on both sides but that gave m...

ruby HttpClient library closing socket after response with persistent connection?

Hi chaps, I'm using the HTTPClient gem (http://github.com/nahi/httpclient) for ruby, to post data to IIS 6.1. Even though both support HTTP 1.1 it seems to be closing the socket after each request made, rather than using persistent connections. I haven't added any flags to enable persistent connections (mainly because having poked about ...

Sending Variable-Length Data Over TCP Socket

My application needs to send/receive xml data via a tcp socket. There is no way to include any kind of a fixed-length header containing message length. As far as I understand, data transmitted over tcp can come to the receipient like this. <messa ge><content >hi</content> </message> But somehow this never happens meaning that data s...

Read the packets of bytes on client socket from server socket for connection oriented (TCP) client/server?

Hello, i m creating connection oriented server/client(TCP) socket.i have created whole server socket and i have written packet on server socket successfully and i have created client socket also but i m not be able to read packet so please give me the idea about read the packet(code or example) on client socket and tell clearly that can...

Problem with own TCPServer

Hello. I have written a TCP server. Then I am trying to connect to my server used Telnet (telnet localhost 2200). Problem: telnet write bad text - like this: ? ?????... static void Main(string[] args) { ASCIIEncoding encoding = new ASCIIEncoding(); //UnicodeEncoding encoding = new UnicodeEncoding(); Byte[] m...

can i display the tcp status in wireshark ?

Im using tcpdump to generate some captures between a client, proxy and an origin server. I was wondering if its possible to either within wireshark or thru some param to indicate in each packet what TCP status the device is at e.g. ip 10.20.30.34 -- CLOSE_WAIT etc.. ...