background preloader

Unit1

Facebook Twitter

Internet socket. A network socket is an endpoint of an inter-process communication across a computer network.

Internet socket

Today, most communication between computers is based on the Internet Protocol; therefore most network sockets are Internet sockets. A socket API is an application programming interface (API), usually provided by the operating system, that allows application programs to control and use network sockets. Internet socket APIs are usually based on the Berkeley sockets standard. Overview[edit] An Internet socket is characterized by at least the following : consequently, TCP port 53 and UDP port 53 are different, distinct sockets. A socket that has been connected to another socket, e.g. during the establishment of a TCP connection, will also be characterized by the following: Remote socket address.

As discussed in the client-server section below, a TCP server may serve several clients concurrently. Socket types[edit] Several Internet socket types are available: Socket states and the client-server model[edit] TCP and UDP port. In computer networking, a port is a software construct serving as a communications endpoint in a computer's host operating system.

TCP and UDP port

A port is always associated with an IP address of a host and the protocol type of the communication. It completes the destination or origination address of a communications session. A port is identified for each address and protocol by a 16-bit number, commonly known as the port number. Specific, well-known port numbers are often used to identify specific applications and services. Of the thousands of enumerated ports, 1024 well-known port numbers are reserved by convention to identify specific service types on a host. In the client-server model of application architecture, ports are used to provide a multiplexing service on each port number that network clients connect to for service initiation, after which communication is reestablished on another connection-specific port number.

Port connection attempts are frequently monitored and logged by computers. TCP. Web browsers use TCP when they connect to servers on the World Wide Web, and it is used to deliver email and transfer files from one location to another.

TCP

HTTP, HTTPS, SMTP, POP3, IMAP, SSH, FTP, Telnet and a variety of other protocols are typically encapsulated in TCP. Historical origin[edit] In May 1974 the Institute of Electrical and Electronic Engineers (IEEE) published a paper titled "A Protocol for Packet Network Intercommunication. "[1] The paper's authors, Vint Cerf and Bob Kahn, described an internetworking protocol for sharing resources using packet-switching among the nodes. Network function[edit] The protocol corresponds to the transport layer of TCP/IP suite. TCP is utilized extensively by many of the Internet's most popular applications, including the World Wide Web (WWW), E-mail, File Transfer Protocol, Secure Shell, peer-to-peer file sharing, and some streaming media applications.

TCP segment structure[edit] A TCP segment consists of a segment header and a data section. UDP. The User Datagram Protocol (UDP) is one of the core members of the Internet protocol suite.

UDP

The protocol was designed by David P. Reed in 1980 and formally defined in RFC 768. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network without prior communications to set up special transmission channels or data paths. UDP is suitable for purposes where error checking and correction is either not necessary or is performed in the application, avoiding the overhead of such processing at the network interface level. Time-sensitive applications often use UDP because dropping packets is preferable to waiting for delayed packets, which may not be an option in a real-time system.[1] If error correction facilities are needed at the network interface level, an application may use the Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP) which are designed for this purpose.

Length Checksum.