Preview

Socket Programming

Powerful Essays
Open Document
Open Document
1283 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Socket Programming
2012/4/13

Socket Programming
BUPT-SE Spring, 2012

Basic Concepts in NP
• Introduction to Network Programming • Program Developing • Basic Concepts
– Process – File Descriptor – System Call – Signal

2

1

2012/4/13

Program Developing - Phases
Begin Requirement Analysis Preliminary Design Investigate the requirements Select or develop an algorithm to solve the problem Define data structure Detailed Design Define the format of input and output Draw a flow-chart and module design Input and edit the source program Coding Compile it no errors Testing Running and testing it successful End
3

errors unsuccessful

Program Developing - skills
• Programming style
– – – – ident, remarks, variable names, http://en.wikipedia.org/wiki/Indent_style http://www.cprogramming.com/tutorial/style.html http://courses.cs.vt.edu/~cs2604/fall01/standards.html

• Editor
– vi, a very powerful full screen editor – pico, an utility with Linux – http://www.reallylinux.com/docs/editors/editor.shtml
– http://pangea.stanford.edu/computing/unix/editing/editorchoices.php

• Related Linux/Unix command
– http://www.cs.cmu.edu/~gilpin/tutorial/

• Backup your program is important!
4

2

2012/4/13

Program Developing – C Compiler in Linux

• cc
– Example: % cc test1.c -o test – test1.c : program to be compiled – -o : specify the name for running program

• gcc
– Example: % gcc test1.c –o test
5

Program Developing – debugger in Linux

• • •

gdb [options] [executable-file [core file or process-id]] Example: % gdb test1 gdb Command list
– – – – – – – – – – – – file : load the program for debugging kill : stop the program for debugging list : list the source code of the program for debugging break : set a break point in the source program run : run the program to be debugged next : execute a single line of the program, but not go into it step : execute a single line of the program, but go into it quit : quit the gdb to shell print : display the

You May Also Find These Documents Helpful

  • Powerful Essays

    The next step in the process is to create a test plan based on the requirements document. The business analyst will perform the procedure of code and then document the expected results and the actual results. It is very important that the documentation has enough detail, so if the test fails, the developer will know where the failure occurred. (Software Testing Procedures, 2009)…

    • 2001 Words
    • 9 Pages
    Powerful Essays
  • Satisfactory Essays

    I found headlines like “Business Requirement Analysis” and “Software Requirement Analysis”. They referred to initializing the first steps towards the development process.…

    • 317 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Development & Acquisition Phase - Transition functional and technical requirements into detailed plans for an actual information system. Results from interviews, use cases, and mock ups are developed into sequence diagrams, activity diagrams, state diagrams, and other artifacts that can be interpreted by software developers. User interfaces are also defined in greater detail (Harwood, 2011).…

    • 813 Words
    • 4 Pages
    Better Essays
  • Powerful Essays

    IT/210 Appendix D

    • 453 Words
    • 4 Pages

    The natural place to start is the system-level requirements you identified in the input-process-output (IPO) chart. Determine how the processes work together: Once you have determined the top-level logic, you can design each individual process. This step-wise refinement process allows you to conceptualize a vague problem into increasing levels of details to actually generate a working program. This point is important because the step-wise refinement process is used throughout the entire program development—each new piece of information is based on, and is a refinement of, the information uncovered in the previous step.…

    • 453 Words
    • 4 Pages
    Powerful Essays
  • Good Essays

    Cis207

    • 776 Words
    • 4 Pages

    The analysis phase collects and analyzes the end user business requirements. Oftentimes these are collected by a Business Analyst or a Project Manager. This phase provides documentation of the detailed set of business needs for the system and includes the documented requirements along with sponsor and stakeholder signatures. Following this with a process diagram or flowchart (such as a Visio document) that outlines the inputs, outputs, and processes of the system is a best practice.…

    • 776 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Calorie Management

    • 820 Words
    • 4 Pages

    For those of you who may not be computer knowledgeable, I will give you a description of the process the team will use to complete their task. The first step the team will do is analyze the problem by identifying a desired result, determining information is needed to produce these results, and determine what processes must be carried out to proceed from the known data to the desired output. Next step the team will work on is designing the program, which entails creating a detailed description, using relatively ordinary language or special diagrams of the program to be created. Simply…

    • 820 Words
    • 4 Pages
    Good Essays
  • Good Essays

    1. The difference between UNIX and Linux is that UNIX trademark is specific to systems that meet a complex set of X/Open standards and has a cost whereas Linux is open source…

    • 537 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    required is for the programmers to commence the coding phase and to translate the design of the…

    • 1463 Words
    • 6 Pages
    Powerful Essays
  • Satisfactory Essays

    CISSH

    • 1734 Words
    • 7 Pages

    You need to download the cissh distribution file from Blackboard. There is a zip file,…

    • 1734 Words
    • 7 Pages
    Satisfactory Essays
  • Good Essays

    The development activities would begin with the planning and requirements phase where all of the application flow, modules and calculations would be defined in detail along with some psudo-code to clarify all of…

    • 613 Words
    • 3 Pages
    Good Essays
  • Good Essays

    The first step in creating such a program is that we need to identify the desired results we are looking for in…

    • 772 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    #If rand is less is than 4, we consider the packet lost and do not respond…

    • 540 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Whatever methodology you selected, you would likely find four common threads - analysis, design, "programming", and implementation. Programming here may be loosely interpreted to include packaged software and even outsourcing, which will be addressed shortly.…

    • 542 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Requirements

    • 1157 Words
    • 5 Pages

    Requirement engineering is the first and crucial phase in the development of software. The main aim of the requirements engineering process is gathering of requirements. It involves set of activities like system feasibility study, analysis, validation and management of the requirements. There are many methods already exist to perform the requirements gathering process and the software developers apply…

    • 1157 Words
    • 5 Pages
    Good Essays
  • Good Essays

    int function1(char x) { //parameter x passed to the function, function returns an integer value…

    • 1596 Words
    • 7 Pages
    Good Essays

Related Topics