tcp

Default Routes

I use my mobile phone for connection to the internet on my laptop, I also have a wired connection to a LAN which doesn't have internet conectivity, it just has our TFS server on it. The problem is that I can't use the internet (from the phone) with the LAN cable plugged in. Is there a way to set the default route to my phone? I'm runni...

Broadcast like UDP with the reliability of TCP

I'm working on a .net solution that is run completely inside a single network. When users make a change to the system, I want to launch an announcement and have everyone else hear it and act accordingly. Is there a way that we can broadcast out messages like this (like UDP will let you do) while keeping guaranteed delivery (like TCP)? ...

How do you minimize the number of threads used in a tcp server application?

I am looking for any strategies people use when implementing server applications that service client TCP (or UDP) requests: design patterns, implementation techniques, best practices, etc. Let's assume for the purposes of this question that the requests are relatively long-lived (several minutes) and that the traffic is time sensitive, ...

UDP vs TCP, how much faster is it?

For general protocol message exchange, with loss tolerant. How much more efficient is UDP over TCP? ...

Track down where packets are being blocked/droped

When I was in China my company's website was blocked for about 24 hours. I assume it was the "Great Chinese Firewall" but I was wondering if there is anyway that I can find out exactly where a packet or TCP/IP connection gets blocked. I was able to verify that it wasn't being blocked at our end(I used the local host file to point to th...

Where do the Linux TCP/IP hackers 'live'?

Over the past year or so my production platform has been plagued by an odd TCP/IP issue. I've spent zillions of hours working with competent & knowledgeable sysadmins, scouring the net, reading source code, been jerked around by RH's pathetic support, and crying tears of blood! To no avail. (Google 'unkn-4' and you'll see many posts w...

Recovering from a broken TCP socket in Ruby when in gets()

I'm reading lines of input on a TCP socket, similar to this: class Bla def getcmd @sock.gets unless @sock.closed? end def start srv = TCPServer.new(5000) @sock = srv.accept while ! @sock.closed? ans = getcmd end end end If the endpoint terminates the connection while getline() is running then ...

Hooking into the TCP Stack in C

It's not just a capture I'm looking to do here. I want to first capture the packet, then in real time, check the payload for specific data, remove it, inject a signature and reinject the packet into the stack to be sent on as before. I had a read of the ipfw divert sockets using IPFW and it looks very promising. What about examples in m...

Best way to open a socket in Python

I want to open a TCP client socket in Python. Do I have to go through all the low-level BSD create-socket-handle / connect-socket stuff or is there a simpler one-line way ? What I'm looking for is something similar to fsockopen in PHP. ...

What kind of issues are there in implementing realtime multiplayer games

I have some experience making multiplayer turn-based games using sockets, but I've never attempted a realtime action game. What kind of extra issues would I have to deal with? Do I need to keep a history of player actions in case lagged players do something in the past? Do I really need to use UDP packets or will TCP suffice? What else? ...

What's the best way to send a file over a network using C#?

Can anyone point me to a tutorial on the best way to open a connection from client to server, read in a binary file and send its contents reliably across the network connection? Even better, is there an open source library that already does this that I could refer to? Thanks! ...

WCF netTCPBinding - Is transport encryption enough?

I've got a WCF service which handles some sensitive data. I'd like to make sure I keep that data from being exposed and so I'm looking at netTCPBinding... primarily because I can control the network it runs across and performance is a high priority. I recognize that there are two areas that can be encrypted: transport level and message...

Scalable socket event queue processing

My C# class must be able to process a high volume of events received via a tcp stream style socket connection. The volume of event messages received from the tcp server by the class's socket is completely variable. For instance, sometimes it will only receive one event message in a period of ten seconds and at other times it will receive...

TCP send queue depth

How do I discover how many bytes have been sent to a TCP socket but have not yet been put on the wire? Looking at the diagram here: I would like to know the total of Categories 2, 3, and 4 or the total of 3 and 4. This is in C(++) and on both Windows and Linux. Ideally there is a ioctl that I could use, but there doesn't seem to be ...

What do you use when you need reliable UDP?

If you have a situation where a TCP connection is potentially too slow and a UDP 'connection' is potentially too unreliable what do you use? There are various standard reliable UDP protocols out there, what experiences do you have with them? Please discuss one protocol per reply and if someone else has already mentioned the one you use ...

Read divert sockets in java?

If I was to create a ipfw divert rule to forward all FTP traffic to a specific socket, is it possible to use Java to connect to the socekt and read the packet information? If so, how would i go about reading/writing to the scoket? ...

What is the largest TCP/IP network port number allowable for IPv4?

What is the highest port number one can use? ...

How do you specify a port range for Java sockets?

In Java you can give the number zero as a single parameter for the Socket or DatagramSocket constructor. Java binds that Socket to a free port then. Is it possible to limit the port lookup to a specific range? Thanks in advance, Roland ...

Manualy choose an interface on TCP to send data

Hi I have a TCP server that is listening on a particular interface only. I want that after the accept() call if the incoming connection was from xxx.xxx.xxx.0 subnet then the data should go through intf1 otherwise the data should be sent through intf2 which is where my server is listening. Both the interfaces have the same route setti...

Tool to monitor HTTP, TCP, etc. Web Service traffic

What's the best tool that you use to monitor Web Service, SOAP, WCF, etc. traffic that's coming and going on the wire? I have seen some tools that made with Java but they seem to be a little crappy. What I want is a tool that sits in the middle as a proxy and does port redirection (which should have configurable listen/redirect ports). A...