Print as pdf if you want a pdf! If you want a nicer printout, click off the browser's automatically added header and footer.

Blekinge Institute of Technology
Department of Computer Science

Revision: 1
Reg.no: BTH-4-1-14-0211-2025


Course syllabus

Socket Programming in C/C++ for Internet Applications

Socket Programming in C/C++ for Internet Applications

7.5 credits (7,5 högskolepoäng)

Course code: DV1728
Main field of study: Computer Science
Disciplinary domain: Technology
Education level: First-cycle
Specialization: G1F - First cycle, has less than 60 credits in first-cycle course/s as entry requirements

Language of instruction: English
Applies from: 2025-03-13
Approved: 2025-03-13

1. Descision

This course is established by Dean 2024-11-06. The course syllabus is approved by Head of Department of Computer Science 2025-03-13 and applies from 2025-03-13.

2. Entry requirements

Admission to the course requires 6 completed credits in C-programming or 12 completed credits in any other programming language.

3. Objective and content

3.1 Objective

The aim of this course is to provide students with:
- A basic understanding of how the Internet works and how sockets (POSIX) can be used for communication over an IP network.
- An understanding of how client and server applications can be designed and implemented, focusing on UDP and TCP as transport protocols.
- An understanding of different programming models and methods for handling communication to/from systems behind Network Address Translation (NAT).

3.2 Content

  • Introduction and historical overview of computer communication and communication networks.
  • Introduction to the Internet and the most common and important protocols (IP, DNS, UDP, TCP, HTTP) from an Internet perspective.
  • Overview of Ethernet, focusing on aspects related to IP communication.
  • Systematic review of UDP and TCP for various communication applications and programming models.
  • Analysis and discussion of HTTP, SSL, and NAT at the end of the course.
  • Forward-looking overview of developments in computer communication.

4. Learning outcomes

The following learning outcomes are examined in the course:

4.1. Knowledge and understanding

On completion of the course, the student will be able to:

  • Describe how communication occurs over the Internet.
  • Describe how DNS, UDP, TCP, and NAT work.

4.2. Competence and skills

On completion of the course, the student will be able to:

  • Implement an IP/TCP/UDP client that follows an application protocol.
  • Implement an IP/TCP/UDP server that follows an application protocol.
  • Implement an IP/UDP/TCP server that handles multiple clients.
  • Implement a client that uses HTTP/s to communicate with a server.

5. Learning activities

The course uses lectures, seminars, and exercises. It begins with a brief presentation of the Internet protocol and Ethernet.

This is followed by a review of UDP communication and TCP communication from both client and server perspectives. Once the basics are covered, we look at the issues that arise when multiple users are involved, both for UDP and TCP. Students work on small exercises in all these areas.

Then we look at HTTP, SSL, and HTTPS, and the challenges of implementing this on the client side. In connection with this, there is also a review of NAT and how this can create a communication challenge.

For each area, there are examination assignments that require the student to interpret, design, and implement solutions that meet the assignment requirements. The assignments consist of two parts: a source code part and a reflection part. If necessary, an assignment can also be supplemented with a discussion where the student explains and justifies their source code.

6. Assessment and grading

Modes of examinations of the course

Code Module Credit Grade
2511 Written assignment 1 2 credits GU
2521 Written assignment 2 2 credits GU
2531 Written assignment 3 2 credits GU
2541 Written assignment 4 1.5 credits GU

The course will be graded G Pass, Ux Failed result, a little more work required, U Fail.

The examiner may carry out oral follow-up of written examinations.

The information before the start of the course states the assessment criteria and make explicit in which modes of examination that the learning outcomes are assessed.

An examiner can, after consulting the Disability Advisor at BTH, decide on a customized examination form for a student with a long-term disability to be provided with an examination equivalent to one given to a student who is not disabled.

7. Course evaluation

The course evaluation should be carried out in line with BTH:s course evaluation template and process.

8. Restrictions regarding degree

The course can form part of a degree but not together with another course the content of which completely or partly corresponds with the contents of this course.

9. Course literature and other materials of instruction

Main Literature:

Unix Network Programming, Volume 1 – The Sockets Networking API; W. Richard Stevens, Bill Fenner; Andrew M. Rudoff; Third Edition; ISBN 978-0-013-141155-5, 2003

10. Additional information

This course replaces DV1619