Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add server on port 1883 and a way to handle incoming connections #13

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

Win-ther
Copy link
Contributor

@Win-ther Win-ther commented Feb 2, 2024

Related Issue(s)

Closes #6

Proposed Changes

  • Add new package thunder and moved Main to it.
  • Add serversocket on port 1883.
  • Add ClientHandler that handles incoming connections and adds them to a List of Clients.

Description

I have added ClientHandler class and made it possible to connect to server on port 1883 on local network.

@Win-ther Win-ther added the enhancement New feature or request label Feb 2, 2024
@Win-ther Win-ther self-assigned this Feb 2, 2024
@Win-ther Win-ther linked an issue Feb 2, 2024 that may be closed by this pull request
ByHatice
ByHatice previously approved these changes Feb 2, 2024
Copy link
Contributor

@vonfredd vonfredd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to separate the Server/Broker logic to keep main method clean and make the server part more maintainable.

src/main/java/org/fungover/thunder/Main.java Outdated Show resolved Hide resolved
@Win-ther
Copy link
Contributor Author

Win-ther commented Feb 5, 2024

I separated the server logic from Main and put it into new class Server.

Copy link
Contributor

@vonfredd vonfredd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@ByHatice ByHatice self-requested a review February 5, 2024 12:24
@kappsegla kappsegla added this pull request to the merge queue Feb 5, 2024
Merged via the queue into main with commit eecbf0c Feb 5, 2024
1 check passed
@kappsegla kappsegla deleted the 6-open-serversocket-on-port-1883 branch February 5, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open serversocket on port 1883
4 participants