answersLogoWhite

0


Best Answer

1)Socket 2)Server Socket Server socket is used for normal two-way socket communication. Socket class allows us to read and write through the sockets. getInputStream() and getOutputStream() are the two methods available in socket class.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why does TCP server program have two sockets?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can two computer program one using TCP connection and other using UDP connection use the same port number at the same time?

Answer(Techsupport)Yes,The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite. TCP is so central that the entire suite is often referred to as "TCP/IP". Whereas IP handles lower-level transmissions from computer to computer as a message makes its way across the Internet, TCP operates at a higher level, concerned only with the two end systems, for example a Web browser and a Web server. In particular, TCP provides reliable, ordered delivery of a stream of bytes from one program on one computer to another program on another computer. Besides the Web, other common applications of TCP include e-mail and file transfer. Among its management tasks, TCP controls message size, the rate at which messages are exchanged, and network traffic congestion.


What is TCP in networks?

The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite. TCP is so central that the entire suite is often referred to as "TCP/IP". Whereas IP handles lower-level transmissions from computer to computer as a message makes its way across the Internet, TCP operates at a higher level, concerned only with the two end systems, for example a Web browser and a Web server. In particular, TCP provides reliable, ordered delivery of a stream of bytes from one program on one computer to another program on another computer. Besides the Web, other common applications of TCP include e-mail and file transfer. Among its management tasks, TCP controls message size, the rate at which messages are exchanged, and network traffic congestion.


Which two TCP IP properties must match on hosts in the same LAN if the hosts are to be able to communicate with each other?

DHCP server and default gateway


How does one go about using a java 7 socket?

A socket is used in computer programming and helps two devices to make a connection. In Java 7, sockets can be employed utilizing the TCP/IP interface.


What function does TCP provide?

The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite, complementing the Internet Protocol (IP), and therefore the entire suite is commonly referred to as TCP/IP. TCP provides reliable, ordered delivery of a stream of bytes from a program on one computer to another program on another computer. TCP is the protocol that major Internet applications such as the World Wide Web, email, remote administration and file transfer rely on. Other applications, which do not require reliable data stream service, may use the User Datagram Protocol (UDP), which provides a datagram service that emphasizes reduced latency over reliability.So it provide: reliable, ordered delivery of a stream of bytes from a program on one computer to another program on another computer


Why does Ventrilo require two components the downloadable Client and the free Ventrilo server?

The Ventrilo requires two components because it will only works if the two components are completed. The client program downloadable for most people and server program is needed for the client to connect with the other people.


What is the use of netstat-ano and netstat-an?

Hi ! These two command tools are the most useful in Exchange Servers( 2003 ) . a. "netstat -an"........it shows a list of listening and connected sockets of websites in Exchange Server. ( tcp, udp, ftp, https, smtp, pop3 and so forth ). b. "netstat -ano"......it shows the process ID (PID) that created the socket. It merely does the same as the first one. swapan.


What is a TCP session termination?

TCP stands for Transmission Control Protocol. It is responsible for sending data and ensuring it gets to its locaton. In order to do this TCP checks to make sure a line is open to send data, if it is then it sends the data, then waits for a message to ensure the data made it to its location. Hence the term TCP session is open when the data is sent and then the TCP session is closed once the data is confirmed that it arrived safely. This is a simplified explanation, pick up any book on Networking and it will explain it to you in detail. TCP/IP is the internet, it is the only protocol used on the Internet because it is so reliable.


How many TCP segments flow between two computers to establish a TCP connection?

Three


Example of client server?

The example of client server model is that to check your bank account from your computer, a client program in your computer forwards your request ro a server program at the bank. this program may in turn forward the request to its own client program that sends a request to a database server at another bank computer to retrieve your account balance.The balance is returned back to the bank data client, which in turn serves it back to the client in your personal computer,which displays the information for you.


Write a socket program in C to implement a listener and a talker?

In socket programming, there are two sides to every conversation: the listener (or server), and talker (the client).The server first opens a desired port, receives a socket handle, and begins listening for connections. It polls the socket every so often to listen for attempted connections by clients. Once a connection has been established, communication begins.A client merely indicates an IP address and port to connect to. Once the connection is made, communication begins.Then there are blocking and non-blocking sockets, which applies to both servers and clients. Blocking socketsforce the program to wait until there's activity before continuing its operation. So a server process will pause while waiting for a connection, and a client process will pause while waiting for the server to send data.Under most conditions, non-blocking sockets are preferred. This allows the program to give up timeslices to the operating system, as well as conduct any activities in the background like listening to multiple connections (for servers).Writing a socket program is about the same between Windows and Unix/Linux based systems, but there are some differences in setting up non-blocking sockets as well as initializing and closing the socket interface.More information on both Win32 and Linux socket programming can be found in the related links below.


What is clien or server mean?

Client/server describes the relationship between two computer programs in which one program, the client, makes a service request from another program, the server, which fulfills the request. Although the client/server idea can be used by programs within a single computer, it is a more important idea in a network. In a network, the client/server model provides a convenient way to interconnect programs that are distributed efficiently across different locations. Computer transactions using the client/server model are very common.