in Computer Networks
3,956 views
1 vote
1 vote
Which of the following system calls not used in UDP echo server program?
A) listen()
B) socket()
C) bind ()
D)recvfrom()
in Computer Networks
4.0k views

2 Comments

A) LISTEN ???
0
0

TCP echo client :- Socket() -->Connect() and then start sending and receiving messages.

TCP echo server :-Socket()-->>bind()-->>listen()-->>accept() and now after connect() call from client , sending , receiving messages.

UDP echo client :-Socket()-->>bind() and then sending and receiving messages.

UDP echo server :-Socket()-->>bind() and then sending and receiving messages.

http://www.cs.northwestern.edu/~agupta/_projects/networking/TCPClientServer/report.html

0
0

2 Answers

3 votes
3 votes
Best answer

The steps of establishing a UDP socket communication on the server side are as follows:

  • Create a socket with the socket() function;
  • Bind the socket to an address using the bind() function;
  • Send and receive data by means of recvfrom() and sendto()

http://www.cs.dartmouth.edu/~campbell/cs60/socketprogramming.html

selected by

2 Comments

what is echo server program(as per the question)?
0
0
An echo server is usually an application which is used to test if the connection between a client and a server is successful. It consists of a server which sends back whatever text the client sent.
3
3
0 votes
0 votes
Listen is not used in UDP as we donot need any synchronization and  connection establishment in UDP.

Related questions