Logo F2FInterview

Networking Interview Questions

Q   |   QA
123next ››

TCP and UDP are both transport-level protocols. TCP is designed to provide reliable communication across a variety of reliable and unreliable networks and internets.

UDP provides a connectionless service for application-level procedures. Thus, UDP is basically an unreliable service; delivery and duplicate protection are not guaranteed. 

A socket is used to connect an application to a network protocol. A socket enables communication between a client and a server. The communication is started when the client is assigned a local port number, and binds a socket to it. The client writes on the socket and gets information from server by reading it. 

A socket is used to connect an application to a network protocol. A socket enables communication between a client and a server. The communication is started when the client is assigned a local port number, and binds a socket to it. The client writes on the socket and gets information from server by reading it. The Socket class is used to communicate. It provides rich set of methods for both asynchronous and synchronous data transfer. ConnectAsynch is used to start an asynchronous connection. SendAsynch and ReceiveAsynch are used to send and receive data. Shutdown and close methods are used to shutdown and close the sockets.

Stream can be considered as a pipe that allows full duplex connection. A datagram or a packet on the other hand, has a source and a destination. There is no connection. Stream is like a communication channel while datagram is completely self contained. Streams provide a reliable and sequenced communication. Datagram’s on the other hand are unreliable and no sequence maintained. 

A stream socket provides two way communications between a client and server. This communication is reliable and sequenced. Stream sockets are above TCP to run across any networks. They provide unduplicated flow of data and have well established mechanism for creating and destroying connections and for detecting errors. 

123next ››

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: