Handind-4

command module
v0.0.0-...-afcd7ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 7 Imported by: 0

README

Handin-4

Contents

Setup

There are 4 pre-defined ports.

All the ports are written in the file "$ports.txt$" If you for some reason would like to alter the ports, then you can change them in the file.

Run the program

Download the zip file.

Ensure you have go downloaded.

Navigate into the folder, and run the following:

go run . $$ 

After this it will display that you are joining on a specific port with a certain node id and at as certain timestamp.

You will then be showed the following prompt:

 Select action: 
  ▸ Request
    Exit

Here you can use your arrow keys and enter to confirm selection.

It will then show on all others if you select Request.

When you have acessed the Critacal Secetion, You will then be showed the following prompt:

 Do you want to quit?: 
  ▸ Yes
    No

Selecting "No": The program releases the Critical Section, allowing other peers to access it, and the system continues running normally.

Selecting "Yes": The connection is terminated, and the system stops.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL