Consider the three way handshake of TCP. It is explained here.
Now the article above mentions that two sides may try to connect simultaneously and the three way handshake works fine in this case.
Can we simulate this situation using the sockets api.
what we usually code using sockets is a passive open(server) and an active open(client)...
is there a tool like tcpflow for windows?
i need to sniff tcp's data only (without the headers)
I would prefer to use command line tool ,so i can grep the output for example
...
Hi all,
We're seeing some strange behaviour and we're not sure if it's a problem with apache, php, mysql or the OS, so over to the big brains of stackoverflow!
We have Apache and mod_php talking to a mysql5 server. Sometimes, a process will choose to hang, trying to read from a file descriptor.
Firing up strace one on of them (all han...
Hi there,
I have a problem in understanding what recv()/recvfrom() return from an non-blockig UDP socket.
A bit more specific and compared to TCP (please correct me if I'm wrong):
A blocking socket (either TCP or UDP) won't return from a recv() until there is some data in the buffer. This could be some number of bytes (TCP) or a comp...
Hi All
I am trying to get a little client/server thing going just to learn how to do it... But after using many samples, following several tutorials even on msdn, none of them have ever worked.
I keep getting the following exception:
System.Net.Sockets.SocketException: No connection could be made because the target machine actively re...
SCTP has native multi-homing support which if I understand it correctly will automatically reroute your packets over a secondary NIC if the primary interface goes down. I duplicated this functionality with TCP by writing a custom routing deamon to modify the routing tables if my primary NIC goes down. I would like to try using SCTP ins...
Hey,
we're working on a peer to peer comm software that would allow a number of grocery stores to sync their inventory with what we call "headquarters".
To so this, we're thinking WCF+WPF, and no IIS and web services. My experience with WCF is basically zero, so my question is whether a TCP comm solution using WCF would work. The data th...
I'm sending data to an extremely old system via TCP. I need to send 2000 bytes in one packet, and I need it not to be split up (what happens when I write out 2000 bytes via a socket).
While, yes, I shouldn't have to care about this at an application level -- I in fact do care about this, because I have no other options on the older syst...
is it possible to have multiple threads sending on the same socket? will there be interleaving of the streams or will the socket block on the first thread (assuming tcp)? the majority of opinions i've found seems to warn against doing this for obvious fears of interleaving, but i've also found a few comments that state the opposite. are ...
Hello,
I'm tyring to add a feature to my app that sends a nudge to all users of my program (family members inside the house), and when they receive the nudge the window of my app on their computer shakes for a second...
Can somebody please suggest how i'd have to go about this? I've never worked with tcp/ip before.. Is this what I shou...
im now developing a project using winpcap..as i have known packets being sniffed are usually fragmented packets.
how to reassemble this TCP segements?..any ideas, suggestion or tutorials available?..
this i assume to be the only way i can view the HTTP header...
thanks!..
...
Hey all, I am trying to determine the status of some servers over the course of time.
Here is my code:
static void Main(string[] args)
{
byte[] readstream = new byte[100];
byte[] sendstream = Encoding.ASCII.GetBytes("PLAYER_JOINED");
string[] IPs = new string[] { "24.15.169.211", "69.198.255.121", "219.79.24...
i asked this previous question here:
http://stackoverflow.com/questions/2231283/tcp-two-sides-trying-to-connect-simultaneously
i tried the method given in the solution and while sending while using netcat and sniffing packets with ethereal i observed that when i sent a "hello" string from one side to the other it was sent in a segment ...
i have sniffed a file upload to find out tcp segments. i see a dup ack and and fast retransmission in the ethereal output. i want to verify that the timer for retransmission of this packet is indeed the one that is indicated by jacobson's formula. i have the timestamps for all segments. what portion of my linux source should i study to f...
According to msdn this parameter means:
controls the maximum number of queued
connection requests that can be
pending for a Web service.
Does this parameter have any influence when used in a autogenerated WCF client proxy. (the one that created with svcutil....)
...
Imagine that you and me are sending a quite long sentence (say, 1024000 bytes) through TCP.
If you write a 1024000 bytes sentence to me, you actually use NetworkStream to write those bytes in.
When I receive, should I know in advance the size of the sentence you sent?
If not, how can I check when I should stop the stream.read?
If yes...
I need to connect to a host, if it's off-line I get a TCP timeout (and it's ok), and if it's online with SSL available, I proceed to the logon phase.
The problem is, when the server is online, accepts connection on the configured TCP port, but then doesn't answer to SSL handshake, our application waits indefinitely for an answer.
I'm u...
I've been trying for more than a week without any success at all, to host wcf service using netTcpBinding.
With http, everything is ok. But with tcp problems arise.
I have performed all the steps I'm supposed to, in order to host my service in WAS:
.Net 3.0 Features are enabled, including http and non-http Activation
. At IIS Manage...
Hello everyone!
We're trying to implement a proxy proof of concept but have encountered an interesting question: since a single HTTP connection can, and indeed should, make mutliple requests, and the HTTP transactions are sent via multiple packets (due to TCP's magic) is it possible for a HTTP request to begin in the middle of a packet?...
Why won't the following code work in C#?
var c1 = new TcpClient(new IPEndPoint(IPAddress.Any, 8787));
var c2 = new TcpClient(new IPEndPoint(IPAddress.Any, 8788));
c1.Connect("localhost", 8788);
I get a "connection cannot be made because the target machine actively refused it". So, the TcpClient constructor doesn't appear to be binding...