tcp

TCP/IP and designing networking application

i'm reading about way to implemnt client-server in the most efficient manner, and i bumped into that link : http://msdn.microsoft.com/en-us/library/ms740550%28VS.85%29.aspx saying : "Concurrent connections should not exceed two, except in special purpose applications. Exceeding two concurrent connections results in wasted resources. A ...

Voice Communication over TCP/IP

Hello, I'm currently developing application using DirectSound for communication on an intranet. I've had working solution using UDP but then my boss told me he wants to use TCP/IP for some reason. I've tried to implement it in pretty much the same way as UDP, but with very little success. What I get is basically just noise. 20% of it is...

How to get at TCP RTT on Windows (Linux TCP_INFO) as an user

I am porting a streaming TCP app from Linux to Windows. The app streams real-time audio data using a preexisting TCP protocol (so switching to UDP isn't an option). Further, I wish to avoid being "part of the problem" and requiring Administrator rights. The Linux code uses getsockopt(... ,SOL_TCP, TCP_INFO, ..) to get the RTT (roun...

Tcp connection another android device, based on phone # instead of IP?

For the current Android application I'm working on, I'm looking to create a tcp connection between the user device, and another Android device based on the phone number instead of the IP address. IE the user would open your contacts list, and be able to create a tcp connection to a contact using the same application as you. I seem to re...

Connection Error: javax.microedition.io.ConnectionNotFoundException:TCP open

Hi, I posted this error here cuz it has been disturbing me for long time whenever i try to connect to my web api from my j2me application.I just would like to share this if somebody has same problem as me. ...

Accessing WCF Service using TCP from the DMZ (not on network or domain)

We have a DMZ where we host an IIS website which in turn communicates to our "app" server (also IIS) WCF services using TCP. When we are on the domain and in the network this works fine. When we try to access the services from the DMZ we get a "cannot handle anonymous" user exception. Accessing the app server directly works fine. A...

Simulate a tcp connection in Go

In Go, a TCP connection (net.Conn) is a io.ReadWriteCloser. I'd like to test my network code by simulating a TCP connection. There are two requirements that I have: the data to be read is stored in a string whenever data is written, I'd like it to be stored in some kind of buffer which I can access later Is there a data structure for...

Multiplayer Networked Anagram game

Hello! I need some help about this little project. I'm begginer in java and it seems to me too hard to make it by myself. So please Help me. I will apperciate any help... A waiter delivers a sequence of letters to various players who are connected. Each player proposes a server anagrams he discovered from the sequence of letters: the...

Network Order short (Java)

I need to send a Network Order short for a game server I'm writing using Java. I read about network order, but I couldn't find any details about a short that is sent before the data. Could someone explain to me what it is, and how to send one to a client with Java? ...

Best way to send an ArrayList<String[]> over TCP in Java?

Hello, I'm writing a client/server application in Java and I'm using TCP to transfer data which I'm storing in an ArrayList (i.e. An ArrayList of arrays of Strings). What is the best way to transfer that data from one to the other? Should I make one long string and use a PrintWriter's println() or is there a better way? Thanks very mu...

boost::asio cleanly disconnecting

Sometimes boost::asio seems to disconnect before I want it to, i.e. before the server properly handles the disconnect. I'm not sure how this is possible because the client seems to think its fully sent the message, yet when the server emits the error its not even read the message header... During testing this only happens maybe 1 in 5 ti...

C#: Alternative to NetworkStream.Read that indicates remote host has closed the connection?

With regards to handling a TCP/IP connection using the TcpClient class, is there an alternative for checking whether the remote host has closed the connection other than waiting for the NetworkStream.Read method to return a 0? ...

what happens when tcp/udp server is publishing faster than client is consuming?

I am trying to get a handle on what happens when a server publishes (over tcp, udp, etc.) faster than a client can consume the data. Within a program I understand that if a queue sits between the producer and the consumer, it will start to get larger. If there is no queue, then the producer simply won't be able to produce anything new,...

Socket.Close doesn't really close tcp socket? (c#)

It seems that using socket.Close() for a tcp socket, doesn't fully close the socket. In the following example I'm trying to connect to example.com at port 9999, which is not opened, and after a short-timeout, I'm trying to close the socket. for (int i = 0; i < 200; i++) { Socket sock = new Socket(AddressFamily.InterNetwork, Sock...

Filtering HTTPS traffic?

Is it possible to filter HTTPs traffic? For example via a TDI filter? Or perhaps you need to use a proxy? This product seems to do filtering of HTTPS traffic and I'd like to know how it does it, as well as if this is the only way. How about via the Windows Filtering Platform for Vista and up? ...

TCP disconnection if no data

Hi! I've checked out TCP protocol Wiki, but haven't found, if socket connection will time out if no data is transferred during the long period. I mean.. there will be no physical problems, but two computers will just have no data to send each other for some time. How connection will still exist? Will there be some low-level data transfer...

How to use Python and Google's Protocol Buffers to deserialize data sent over TCP

I'm trying to write an application which uses Google's protocol buffers to deserialize data (sent from another application using protocol buffers) over a TCP connection. The problem is that it looks as if protocol buffers in Python can only deserialize data from a string. Since TCP doesn't have well-defined message boundaries and one o...

Read-Write UDP connected sockets?

We are trying to get two programs to communicate with each other in a game-like fashion. They maintain a TCP connection with a central server for "control" type information, which that central server ensures both clients receive. The two clients then communicate with a udp server using sendto() and recvfrom() which just sends the infor...

How to use NetCat for Windows to send a binary file to a TCP connection?

If I want to transfer a binary file "binary.bin" (located in the same directory as NetCat) to IP address 127.0.0.1 port 1200 using TCP, how do I specify this using NetCat for windows? ...

Modify destination port in TCP/IP headers of all outgoing packets

Used SSH Tunnel to route the traffic addressed to server1:port1 to server2:port2. Now,the problem is that i want to redirect all TCP/IP packets from desktop addressed to server1:port1 to server2:port2. using "hosts" file on windows, i mapped server1 ip as ipaddress of server2. [local DNS mapping] http://server2:port2 //gives the desir...