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

  • 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
  • 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
  • Satisfactory Essays

    Unit 454 Lab 4 Essay

    • 457 Words
    • 2 Pages

    The 3 components of the 3-way handshake are SYN-SYN-ACK. There are 3 messages transmitted by TCP to negotiate and start a TCP session between the two computers. This is designed so that two computers attempting to communicate can negotiate the parameters of…

    • 457 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    NT1210Unit3Lab3

    • 1288 Words
    • 4 Pages

    Exercise 3.3.3 The most common protocols used from this suite are IP, TCP, and UDP. Briefly describe the purpose and functions of each of these.…

    • 1288 Words
    • 4 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
  • Satisfactory Essays

    netw 240 week 7

    • 330 Words
    • 3 Pages

    What Field in the TCP header contains a well known port number that maps to the Application that will handle the segment Data Stream?…

    • 330 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Manages information-consistency capacities, i.e., gives a dependable byte stream between two nodes on a system. TCP and UDP exert at this particular level.…

    • 1263 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    Unit 3 Lab

    • 290 Words
    • 2 Pages

    A 3-way handshake allows a connection to be created between a client and server. The client sends a SYN requesting a connection to the server, then the server sends a SYN-ACK back to acknowledge the request, then the client send an ACK to acknowledge the connection to the server.…

    • 290 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    In a computer network internet protocol is used for communication, to each device such as printers and computers a numerical label called an IP (Internet Protocol) Address is assigned. There are two functions of an IP Address a host or network interface identification, and also provides a location addressing. The basic elements of a network are the IP Address and Subnet Mask. There is also switching and routing which after you connect devices to switches and routers, data packets can be moved across the network. The Internet Protocol Version 4 (known as IPv4) is a protocol highly used even today, this IP Address consist of a 32-bit number in decimal or binary in four parts. In 1995 Internet Protocol Version 6 (known as IPv6) was created due to a high growth of the Internet, and the reduction of…

    • 413 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    A communication protocol is a set of rules that allow two or more devices to communicate, so they can send and receive…

    • 1327 Words
    • 6 Pages
    Better 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
  • Powerful Essays

    TCP / IP Model - provides end-to-end connectivity specifying how data should be formatted, addressed, transmitted, routed and received at the destination. This functionality has been organized into four abstraction layers which are used to sort all related protocols according to the scope of networking involved.[1][2] From lowest to highest, the layers are the link layer, containing communication technologies for a single network segment (link), the internet layer, connecting hosts across independent networks, thus establishing internetworking.…

    • 559 Words
    • 3 Pages
    Powerful 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
  • Good Essays

    Week 4 Assignment

    • 815 Words
    • 3 Pages

    The scenario I am proposing to test the BCP for the company is a hacker scenario. A hacker attempts to break into the network and access delicate information that shouldn’t be accessible by anyone outside of the company. The combination of business and IT transformation, compliance and governance demands and the onslaught of security threats continues to make the job of safeguarding data assets a serious challenge for organizations of all types—from multinational corporations to independent merchants to government entities. The purpose of this test would be to see how quickly the attack is detected and stopped in addition to tracking to discover the identity of the hacker.…

    • 815 Words
    • 3 Pages
    Good 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

Related Topics