Visualizing berkeley socket calls in students' programs

  • Authors:
  • Christian Brown;Chris McDonald

  • Affiliations:
  • University of Western Australia;University of Western Australia

  • Venue:
  • Proceedings of the 12th annual SIGCSE conference on Innovation and technology in computer science education
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

The Berkeley Sockets API is a library of functions, macros, and data structures enabling a program to initiate and manage network communication between two or more processes on the same machine, or across a network of machines. The API is the main mechanism by which programs communicate with the operating system's TCP/IP stack and thereby with almost all Internet services and programs. Socket programming opens a new realm of development for Computer Science students as they are able to create programs that can communicate via the Internet. However, while learning, students frequently misuse the sockets API or have difficulty understanding where run-time and logic errors in their code occur. Students learning about sockets are typically presented with a series of static diagrams in textbooks that increase in complexity with each progression. These diagrams may not allow the reader to easily comprehend the transition between each step, nor understand which functions in the API perform the events. Space constraints in textbooks often limit a sequence of diagrams to two or three, whereas over 10 calls to the sockets API are often necessary to initiate and undertake communication. Surprisingly, there are no effective tools or general techniques for debugging students' socket programs. In this paper we present a software solution to visualize the execution of students' programmed interactions with the Berkeley Sockets API. The tool accepts the source code of two or more networking programs and compiles them in such a way that, at run-time, their calls to the socket API and related functions are displayed, together with an annotation of activity and error conditions. The program is not simply a static simulator - it provides a means to visualize the network events in actual student developed program.