Skip to content

Some notes about this project #1

@blindacai

Description

@blindacai

Heard it's similar to a1, but this time the server needs to parse client's commands and send back responses
We can test it using a1 or netcat

  • In /test/server.c, we will mostly look at accept() and send()

  • How to compile and run C in Unix:
    gcc -o out some_name.c
    ./out

  • How to debug?

  • Everything should be compiled in Unix
    Be careful when look up usage of C functions. Many only apply to Windows
    A reliable source is to use command: man <function_name>, choose 3

  • we only deal with one client here

  • eventually should test it with client: ftp ftp.cs.ubc.ca(should be localhost?) 3500 (don't choose port below 1024)

  • raw ftp command reference

  • socket workflow

  • You might find the Unix library routines strncmp(), toupper(), or the whole set of regex routines helpful

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions