Skip to content

Latest commit

 

History

History
executable file
·
61 lines (40 loc) · 1.77 KB

README.md

File metadata and controls

executable file
·
61 lines (40 loc) · 1.77 KB

Romanian railways application

You can find the romanian version of this document here.

video_ro_comp.mp4

Connect

To establish connection with my server make sure to:

  • install openvpn3
  • start a session using this vpn key (openvpn3 session-start --config docs/vpnkey.ovpn)
  • send a mail at [email protected] for the credentials asked at the previous step
  • compile and run the client application with the following arguments: '10.100.0.30' and '2970'

Main files

Technologies

  • C - socket(), bind(), connect(), pthread_t
  • C++ - std::mt1337
  • libxml2 - official page

Features

The communication protocol

Please consult some definitions from here

  • [id_train, time_departure, time_arrival, status] routes(location_departure, location_arrival);
  • [id_train, time_departure, location_arrival] departures(location_departure);
  • [id_train, time_arrival, location_departure] arrivals(location_arrival);
  • bool report(id_train, minutes);
  • bool quit();

Speed

  • prethreaded execution
  • create thread for each client
  • i/o multiplexing with non-blocking calls

Correctness

  • client uses tcp to server when sending data
  • client uses udp to server when sending queries
  • server uses tcp to client when sending data

Security

  • specific procedures for possible errors
  • solutions if one party stops responding
  • test driven-development

Limitations

  • only 1024 users can be connected at once
  • not Windows portable