Preview

Socket Programming

Good Essays
Open Document
Open Document
4392 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Socket Programming
sockets

Socket Programming in C/C++ c Mani Radhakrishnan and Jon Solworth September 24, 2004

c Mani Radhakrishnan and Jon Solworth

Socket Programming in C/C++

sockets

Contact Info

Mani Radhakrishnan Office 4224 SEL email mradhakr @ cs . uic . edu Office Hours Tuesday 1 - 4 PM

c Mani Radhakrishnan and Jon Solworth

Socket Programming in C/C++

sockets

TCP UDP

Introduction

Sockets are a protocol independent method of creating a connection between processes. Sockets can be either connection based or connectionless: Is a connection established before communication or does each packet describe the destination? packet based or streams based: Are there message boundaries or is it one stream? reliable or unreliable. Can messages be lost, duplicated, reordered, or corrupted?

c Mani Radhakrishnan and Jon Solworth

Socket Programming in C/C++

sockets

TCP UDP

Socket characteristics

Socket are characterized by their domain, type and transport protocol. Common domains are: AF UNIX: address format is UNIX pathname AF INET: address format is host and port number Common types are: virtual circuit: received in order transmitted and reliably datagram: arbitrary order, unreliable

c Mani Radhakrishnan and Jon Solworth

Socket Programming in C/C++

sockets

TCP UDP

Socket characteristics (cont’d)

Each socket type has one or more protocols. Ex: TCP/IP (virtual circuits) UDP (datagram) Use of sockets: Connection–based sockets communicate client-server: the server waits for a connection from the client Connectionless sockets are peer-to-peer: each process is symmetric.

c Mani Radhakrishnan and Jon Solworth

Socket Programming in C/C++

sockets

TCP UDP

Socket APIs socket: creates a socket of a given domain, type, protocol (buy a phone) bind: assigns a name to the socket (get a telephone number) listen: specifies the number of pending connections that can be queued for a server socket. (call waiting

You May Also Find These Documents Helpful

  • Satisfactory Essays

    In the event that a packet becomes lost due to network congestion, traffic load balancing, or other unpredictable network behavior, TCP detects these problems, requests retransmission of lost data, rearranges out-of-order data, and even helps minimize network congestion to reduce the occurrence of the other problems. Once the TCP receiver has reassembled the sequence of octets originally transmitted, it passes them to the application program.…

    • 350 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    IS3220 FINAL STUDY GUIDE

    • 1708 Words
    • 7 Pages

    To establish a connection, TCP uses a three-way handshake. Before a client attempts to connect with a server, the server must first bind to and listen at a port to open it up for connections: this is called a passive open. Once the passive open is established, a client may initiate an active open. To establish a connection, the three-way (or 3-step) handshake occurs:…

    • 1708 Words
    • 7 Pages
    Powerful Essays
  • Satisfactory Essays

    lab 5

    • 440 Words
    • 2 Pages

    The significance of the TCP three-way handshake is that three messages are transmitted by TCP to negotiate and start a TCP session between the computers. The purpose is so that two computers can negotiate the parameters of the network TCP socket connection before transmitting the data. Wireshark is the application that uses TCP as a transport protocol.…

    • 440 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    IS3220 Final Exam

    • 700 Words
    • 4 Pages

    4. Which of the following protocols is a connection-oriented protocol that operates at the transport layer of the OSI model and supports reliable connections?…

    • 700 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    nt1210 unit 1 lab1

    • 1325 Words
    • 5 Pages

    8. The TCP/IP and OSI models have some obvious differences, like the number of layers. Think about the more commonly used version of the TCP/IP model discussed in this chapter, and then think about how to talk about TCP/IP using OSI…

    • 1325 Words
    • 5 Pages
    Good Essays
  • Good Essays

    1. Which of the following is true about a TCP/IP network? The network uses standards defined in TCP/IP RFC's plus other standards.…

    • 1038 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    It 240 Appendix F

    • 260 Words
    • 2 Pages

    Transmission Control Protocol / Internet Protocol (TCP/IP) TCP is the protocol used in networking that provides a connection-oriented, reliable way for applications to communicate large amount of data at one time over a network. IP is a connectionless protocol responsible for addressing network devices, and routing packets between…

    • 260 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    nt2640 week1

    • 1824 Words
    • 8 Pages

    1. Which of the following protocols are examples of TCP/IP transport layer protocols? (More than one answer could be correct.)…

    • 1824 Words
    • 8 Pages
    Good Essays
  • Good Essays

    ISSC362 lab 7 jarad krum

    • 696 Words
    • 2 Pages

    3. What is the significance of the TCP, 3-Way Handshake for applications that utilize TCP as a transport protocol? Which application in your protocol capture uses TCP as a transport protocol?…

    • 696 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Unit 9 L3 BTEC IT P2

    • 339 Words
    • 2 Pages

    A protocol is the rules that computers follow when communicating therefore the standards of the network. For the communication to be successful two devices need to communicate the same way –with the same language or code- for the communication to be successful. If both devices are not following the same protocol then the communication won’t be successful due to the fact that both devices won’t understand each other. It is a bit like language barriers between people talking – if you don’t understand the language the person communicating to you is talking in you won’t understand what they are trying to communicate it is the same with computers.…

    • 339 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    What is the significance of the TCP three-way handshake for applications that utilize TCP as a transport…

    • 338 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    The NETSTAT utility is a command available on most platforms that enables a user to list the sockets in use on a system. The information returned by the command is only for the local host, and there is no provision for monitoring remote hosts using this utility.…

    • 670 Words
    • 3 Pages
    Powerful Essays
  • Good Essays

    Nt1330 Unit 5 Assignment 1

    • 1348 Words
    • 6 Pages

    4. The server accept the connection and to send the data from server to client and vice…

    • 1348 Words
    • 6 Pages
    Good Essays
  • Good Essays

    TCP/IP is a suite of standards that computers use to communicate with across a medium4. TCP (transmission control protocol) is a protocol that requires a connection to transfer data from one node to another. UDP (user datagram protocol) does not require a connection. Information is split up into small sections called packets and sent over the medium. UDP does not require as much packet overhead as TCP and is more efficient to send data quickly. TCP is better for error checking of the data sent and received. Any protocol used has its…

    • 897 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Nt1310 Unit 1 Essay

    • 443 Words
    • 2 Pages

    TCP – TCP stands for “transmission control protocol” and it is the pieces that manages all movement of each data packet between computers. It establishes a connection between the computers. It also acknowledges that each packet have been…

    • 443 Words
    • 2 Pages
    Satisfactory Essays

Related Topics