Does TCP actually define 'TCP server' and 'TCP clients'? [closed] - sockets

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
In the Wikipedia article, TCP communication is explained using the terms 'client' and 'server'. It also uses the word 'peers'.
But to my knowledge, the TCP standard does not define "TCP clients" and "TCP servers".
In the RFC 675 document (the "Specification of Internet Transmission Protocol Program"), the word "client" never appears. The RFC explains that TCP is used to connect processes over ports (sockets), and that 'A pair of sockets form a CONNECTION which can be used to carry data in either direction [i.e. full duplex].
However, calling the originating party the "client" seems to be common practice. But IMHO this client/server communication model is not always applicable to TCP communication. For example take peer-to-peer networks. Calling all processes which open a socket and wait for incoming connections from peers "TCP servers", sounds wrong to me. (And I would not call my uncle's telephone device a "Telephony server" if I dial his phone number and he picks up.)

TCP is only about connecting one process to another via a bi-directional, ordered byte stream. Talk of 'clients' and 'servers' describes a common usage pattern, but is external to the definition of TCP itself.

Related

TCP event-based connection vs UDP data exchange [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed yesterday.
Improve this question
I were making event based project, but when I tried to choose between TCP and UDP I got lost.
Connecting using TCP sounds good, but performance might be affected due to buffering.
On the other hand, UDP is more suitable in terms of performance and context, but some requests require guarantees and/or connection.
So, TCP or UDP?
Data Size < 2KB
Tested with TCP - a bit laggy on activity spikes with macroses, UDP is not implemented yet, but I usually have spikes of packet loss when working with it.

How to specify tshark script what interface to capture on [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am running this command with the intention of capturing all SIP traffic on port 5060
C:\windows\system32>"C:\Program Files\Wireshark\tshark.exe" -f "tcp port 5060 or udp port 5060" -b filesize:25000 -b files:1200 -w c:\shark\capture.pcap
Capturing on 'Local Area Connection* 9'
Unfortunately, I do not want to capture the traffic on "Local Area Connection* 9" but on VoIPSys. As it can be seen below, when I open Wireshark this options are available to select:
I also do not understand why "Local Area Connection* 9" is chosen by default by sharkt
The manual explicitly says
It will use the pcap library to capture traffic from the first
available network interface and displays a summary line on the
standard output for each received packet.
therefore, you get this interface.
In order to use other interfaces you can list the interfaces with the "-D" switch and use this interface with the "-i" option
As an easier way without the command line you can select "Capture" in the top bar, then "Options" when you have the GUI open.
With the interface you want to trace selected you can then add filters. If you are looking for just 5060 SIP traffic just put in that box "port 5060" and press start. this will only capture via the filtered protocol/port/IP etc you want.
I use them heavily and a list can be found here if you need anymore: https://wiki.wireshark.org/CaptureFilters
Thanks.

Is it possible to share IP on server among multiple applications?

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 hours ago.
Improve this question
Have you heard about Russia blocking IPs of Amazon’s servers (millions of them) in order to block messenger Telegram? There are a lot of cases when people are saying that their unrelated to Telegram applications, but located on Amazon servers, laid down as well as a consequence.
I was wondering if this teqnically possible situation. If I, for example, use Amazon’s server for my app, do I share an IP with others? Does it mean that if somebody blocks this IP to block another app, then I screw up as well? Or these are all fake sayings, and block is targeted enough to avoid this?
Is it possible to share IP on server among multiple applications?
Definitely. This is why transport protocols like TCP and UDP use port numbers. These port numbers serve as sub-addresses for the IP.
Some application protocols can even share the same IP address and port combination, like HTTP. An HTTP vhost (or a proxy) can direct the request to the desired server instance depending on the URL parameters.
So, when Internet censorship is applied on the IP address basis, it's not uncommon to filter more than intended.

How to connect two devices behind router [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
Device A -> Router -- Internet -- Router <- Device B
I know VoIP normally direct connect two device. But I don't know how they get connected. I assume there's a server on internet.
For others have questions like me:
http://en.wikipedia.org/wiki/NAT_traversal
If the two routers are doing NAT, then yes, probably there is a server in the middle. So, each device only has to make a connection OUT through the router, which is no problem. Then the server can pass data back and forth between them.
But it is also possible to make a connection directly, even if both routers are doing NAT. In order for this to work, at least one router needs to have a port forwarding configuration set up, to allow an inbound TCP connection from the other to be forwarded to the correct device, on some specific port. This port forwarding could be manually configured on the router or it could (depending on the router) be set up automatically by the device, using UPnP protocol (if the router supports it).
Even then, usually there's a server in the middle that both devices might communicate with to find out the IP and port number used by the other device. But if you have other ways of knowing this information, it's not necessary.
Hope this helps.
I assume since you mention VOIP you are wondering how two IP Phones connect?
Phone is configured with the IP address of a PBX. Phone 1 makes a call. The digits are sent to the PBX. The PBX examines the phone number dialed and looks up the phone number in something called a dial plan. That dial plan tells the PBX the path to get to the phone number dialed. It may say open a connection to the phone company or it might tell the PBX the IP address of the other PBX.
If it gets the IP address of another PBX it sends a SIP message to the remote PBX informing that it has a incoming call. The remote PBX accepts the SIP message and sets up the call and tells the remote phone to ring. When the phone is answered the two IP PBX's agree that the call is set up and tells each phone the ip address of the other phone and allows them to communicate directly.

How many people can connect to one port? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Hi this will be an easy question.
Ftp, as an example, works on ports 20, 21. How many different people can connect to the same ftp server on the same port (21) at the same time?
As many as the server and the server OS can handle. There is no specific limit.
All the comments citing specific clients are incorrect, as is the one stating '1-8 as far as I know.' The comment about 'FTP Site Default settings' only applies to Microsoft IIS.
Port is the virtual interfacing used to differentiate services. In your case FTP server listen on particular port 21 which differentiate all other services/servers running on the same system listening to the same IP address (eg: DHCP server on 67 etc.,).
So the port are used only at Transport and Application layer (to bind to the particular port). The number of connections is limited with the help of "listen" system call (in case of linux), which will used in server binding.
Note: Observe any PCAP traces and socket programming to understand the usage of port.