On Fri, 20 Mar 2009 01:56:56 -0700 Michael David Crawford <[email protected]> wrote:
> Yoshihiro Ota wrote: > > > I saw a program that opens 2 TCP connections. > > One connection is only used for server to client messaging only > > and the other connection is used only for client to server messaging. > > > > 2. He also said that it would also waste network bandwidth. > > You have a two-way communication no matter what you do. But if you > don't actually use inbound direction, all it gets used for is the > receipt of ACK packets. > > That is, the inbound connection is used to make the data transfer reliable. > > If you don't have any payload data on the inbound connection, then the > outbound connection won't have any ACK packets. > > If you're sending payload data, the ACK info can "hitchhike" along with > the payload packets, thus saving bandwidth. But if you're not sending > any payload data at all, there will be packets transmitted which contain > the ACKs and nothing else. > > The extra network overhead will be modest if you're sending a lot of > data all at once, say transferring a large file. But if very little > data is sent per packet, say individual characters in a telnet > connection, the overhead would be very high. So far until this, this was what I had though and learned about TCP connections. > If you have a single connection with payload data in both directions, > then the ACKs will almost always ride along with some payload data. The > only time a packet will contain nothing but an ACK will be when some > data was transmitted, but none is to be received at the time. > > Mike However, I had forgotten this case. This can explain he even said that using 2 TCP connection would cut the bandwidth into half. This sounds like the case he was referring to. Thanks, Hiro _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[email protected]"

