Stuck with your Network Programming Assignment Help. Get 24/7 help from tutors with Phd in the subject. Email us at support@helpwithassignment.com
Reach us at http://www.HelpWithAssignment.com
When we desire a communication between two applications possibly running on different machines, we need sockets. This presentation aims to provide knowledge of basic socket programming to undergraduate students. Basically, this presentation gives the importance of socket in the area of networking and Unix Programming. The presentation of Topic (Sockets) has designed according to the Network Programming Subject, B.Tech, 6th Semester syllabus of Punjab Technical University Kapurthala, Punjab.
Stuck with your Network Programming Assignment Help. Get 24/7 help from tutors with Phd in the subject. Email us at support@helpwithassignment.com
Reach us at http://www.HelpWithAssignment.com
When we desire a communication between two applications possibly running on different machines, we need sockets. This presentation aims to provide knowledge of basic socket programming to undergraduate students. Basically, this presentation gives the importance of socket in the area of networking and Unix Programming. The presentation of Topic (Sockets) has designed according to the Network Programming Subject, B.Tech, 6th Semester syllabus of Punjab Technical University Kapurthala, Punjab.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
2. +A Client-Server Transaction
■ Many network applications are based on the client-server
model:
■ A server process and one or more client processes
■ Server manages some resource
■ Server provides service by manipulating resource for clients
■ Server activated by request from client
Client
process
Server
process
1. Client sends request
3. Server sends response
4. Client
handles
response
2. Server
handles
request
Resource
Note: clients and servers are processes running on hosts
(can be the same or different hosts)
3. +Computer Networks
■ A network is a group of connected systems that are able to
communicate in order to exchange data.
■ There are many kinds of networks, some examples..
■ LAN (Local Area Network) spans a building or campus
■ Ethernet is most prominent example
■ WAN (Wide Area Network) spans country or world
■ Typically high-speed point-to-point telecom lines
■ An internetwork (internet) is an interconnected set of networks
■ The Global IP Internet (uppercase “I”) is the most famous
example of an internet (lowercase “i”)
4. +Computer Networks con’t
■ Network devices that originate, route and terminate data are
called 'nodes'.
■ Nodes or 'hosts' can be personal computers, phones, servers as
well as special networking hardware.
■ Two such devices can be said to be 'networked' together when
one device is able to exchange information with the other device.
■ A 'router' is an networking device that forwards data between
networks in an internet.
■ A 'link' is the means of connecting one location to another for
the purpose of transmitting and receiving data across networks.
■ phone lines, fiberoptic cables, bluetooth, ethernet, wireless, etc...
5. +Logical Structure of an internet
■ Ad hoc interconnection of networks
■ No particular topology
■ Vastly different router & link capacities
■ Send packets from source to destination by hopping through networks
■ Router forms bridge from one network to another
■ Different packets may take different routes
router
router
router
router
router
router
host
host
6. +The Notion of an internet Protocol
■ How is it possible to send bits across incompatible LANs and
WANs?
■ Solution: protocol software running on each host and router
■ A protocol is a set of rules that governs how hosts and routers
should cooperate when they transfer data from network to
network.
■ The rules define the syntax, semantics and synchronization of
communication and possible error recovery methods.
■ Protocols may be implemented by hardware, software, or a
combination of both.
7. +What Does an internet Protocol Do?
■ Provides a naming scheme
■ An internet protocol defines a uniform format for host addresses
■ Each host (and router) is assigned at least one of these internet
addresses that uniquely identifies it
■ Provides a delivery mechanism
■ An internet protocol defines a standard transfer unit (packet)
■ Packet consists of header and payload
■ Header: contains info such as packet size, source and destination
addresses
■ Payload: contains data bits sent from source host
■ Lots of other things…
■ Example, what order do the bytes go on the wire? Little-endian or Big-
endian?
8. +Global IP Internet (upper case)
■ Most famous example of an internet
■ Based on the TCP/IP protocol family
■ IP (Internet Protocol) :
■ Provides basic naming scheme and unreliable delivery capability
of packets (datagrams) from host-to-host
■ UDP (Unreliable Datagram Protocol)
■ Uses IP to provide unreliable datagram delivery from
process-to-process
■ TCP (Transmission Control Protocol)
■ Uses IP to provide reliable byte streams from process-to-process
■ Accessed via a mix of Unix file I/O and functions from the
sockets interface
9. +Organization of an Internet Application
TCP/IP
Client
Network
adapter
Global IP Internet
TCP/IP
Server
Network
adapter
Internet client host Internet server host
Sockets interface
(system calls)
Hardware interface
(interrupts)
User code
Kernel code
Hardware
and firmware
10. +A Programmer’s View of the Internet
■ Hosts are mapped to a set of 32-bit IP addresses
■ 128.122.49.30
■ The set of IP addresses is mapped to a set of identifiers called
Internet domain names
■ 128.122.49.30 is mapped to cs.nyu.edu
■ A process on one Internet host can communicate with a process
on another Internet host over a connection
11. +Domain Naming System (DNS)
■ The Internet maintains a mapping between IP addresses and
domain names in a huge worldwide distributed database called
DNS
■ Conceptually, programmers can view the DNS database as a
collection of millions of host entries.
■ Each host entry defines the mapping between a set of domain
names and IP addresses.
■ These names can be resolved on the command line using
nslookup command.
■ Many names can be mapped to the same IP or multiple IPs
mapped to same name.
■ Why? Geolocation.
12. +Internet Connections
■ Clients and servers communicate by sending streams of bytes over
connections. Each connection is:
■ Point-to-point: connects a pair of processes.
■ Full-duplex: data can flow in both directions at the same time,
■ Reliable: stream of bytes sent by the source is eventually received by
the destination in the same order it was sent.
■ A port is a 16-bit integer that identifies a process:
■ Ephemeral port: Assigned automatically by client kernel when client
makes a connection request. (Also used by server in some cases)
■ Well-known port: Associated with some service provided by a server
(e.g., port 80 is associated with Web servers)
■ A socket is an endpoint of a connection
■ Socket address is an IPaddress:port pair
13. +Well-known Ports and Service Names
■ Popular services have permanently assigned well-known ports
and corresponding well-known service names:
■ Examples
■ echo server: 7/echo
■ ssh servers: 22/ssh
■ email server: 25/smtp
■ web servers: 80/http
■ 0-1023 have special semantics
■ https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
■ Mappings between well-known ports and service names is
contained in the file /etc/services on each Linux machine.
14. +Anatomy of a Connection
■ A connection is uniquely identified by the socket addresses of
its endpoints (socket pair)
■ (cliaddr:cliport, servaddr:servport)
Connection socket pair
(128.2.194.242:51213, 208.216.181.15:80)
Server
(port 80)
Client
Client socket address
128.2.194.242:51213
Server socket address
208.216.181.15:80
Client host address
128.2.194.242
Server host address
208.216.181.15
51213 is an ephemeral port
allocated by the kernel
80 is a well-known port
associated with Web servers
15. +Sockets
■ What is a socket?
■ To the kernel, a socket is an endpoint of communication
■ To an application, a socket is a file descriptor that lets the
application read/write from/to the network
■ All Unix I/O devices, including networks, are modeled as files
■ Clients and servers communicate with each other by reading
from and writing to socket descriptors
■ The main distinction between regular file I/O and socket I/O is
how the application “opens” the socket descriptors
Client Server
clientfd serverfd
16. +Socket Address Structures
■ Generic socket address:
■ For address arguments to connect, bind, and accept
■ Necessary only because C did not have generic (void*) pointers
when the sockets interface was designed
struct sockaddr {
uint16_t sa_family; /* Protocol family */
char sa_data[14]; /* Address data. */
};
sa_family
Family Specific
17. +Socket Address Structures con’t
■ Internet-specific socket address:
■ Must cast struct sockaddr_in* to struct sockaddr*
for functions that take socket address arguments.
0 0 0 0 0 0 0 0
sa_family
Family Specific
struct sockaddr_in {
uint16_t sin_family; /* Protocol family (always AF_INET) */
uint16_t sin_port; /* Port num in network byte order */
struct in_addr sin_addr; /* IP addr in network byte order */
unsigned char sin_zero[8]; /* Pad to sizeof(struct sockaddr) */
};
sin_port
AF_INET
sin_addr
sin_family
18. +
5. Drop client
4. Disconnect client
3. Exchange
data
2. Start client 1. Start server
Client /
Server
Session
Client
Server
socket
socket
bind
listen
read
write
read
write
Connection
request
read
close
close
EOF
accept
connect
Client/Server
19. +Sockets Interface: socket
■ Clients and servers use the socket function to create a socket
descriptor:
■ Example:
int socket(int domain, int type, int protocol)
int clientfd = Socket(AF_INET, SOCK_STREAM, 0);
Indicates that we are
using 32-bit IPV4
addresses
Indicates that the socket
will be the end point of a
TCP connection
20. +Sockets Interface: bind
■ A server uses bind to ask the kernel to associate the server’s
socket address with a socket descriptor:
■ The process can read bytes that arrive on the connection whose
endpoint is addr by reading from descriptor sockfd.
■ Similarly, writes to sockfd are transferred along connection
whose endpoint is addr.
int bind(int sockfd, sockaddr* addr, socklen_t addrlen);
21. +Sockets Interface: listen
■ By default, kernel assumes that descriptor from socket
function is an active socket that will be on the client end of a
connection.
■ A server calls listen to tell the kernel that a descriptor will
be used by a server rather than a client:
■ Converts sockfd from an active socket to a listening socket
that can accept connection requests from clients.
■ backlog is a hint about the number of outstanding
connection requests that the kernel should queue up before
starting to refuse requests.
int listen(int sockfd, int backlog);
22. +Sockets Interface: accept
■ Servers wait for connection requests from clients by calling
accept:
■ Waits for connection request to arrive on the connection bound
to listenfd, then fills in client’s socket address in addr and
size of the socket address in addrlen.
■ Returns a connected descriptor that can be used to
communicate with the client via Unix I/O routines.
int accept(int listenfd, sockaddr* addr, int* addrlen);
23. +Connected vs. Listening Descriptors
■ Listening descriptor
■ End point for client connection requests
■ Created once and exists for lifetime of the server
■ Connected descriptor
■ End point of the connection between client and server
■ A new descriptor is created each time the server accepts a connection
request from a client
■ Exists only as long as it takes to service client
■ Why the distinction?
■ Allows for concurrent servers that can communicate over many client
connections simultaneously
■ E.g., Each time we receive a new request, we fork a child to handle
the request
24. +Sockets Interface: connect
■ A client establishes a connection with a server by calling
connect:
■ Attempts to establish a connection with server at socket
address addr
■ If successful, then clientfd is now ready for reading and
writing.
■ addrlen is sizeof(sockaddr_in)
int connect(int clientfd, sockaddr* addr, socklen_t addrlen);
25. +accept & connect Illustrated
listenfd(3)
Client
1. Server blocks in accept,
waiting for connection
request on listening
descriptor listenfd
clientfd
Server
listenfd(3)
Client
clientfd
Server
2. Client makes connection
request by calling and blocking in
connect
Connection
request
listenfd(3)
Client
clientfd
Server
3. Server returns connfd from
accept. Client returns from
connect. Connection is now
established between clientfd and
connfd
connfd(4)
26. +Socket Client & Server
■ Lets take a look at some code…
■ See lecture24/client.c and lecture24/server.c