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

Adding a few more basic commands to the server #48

Open
Antwns opened this issue Nov 12, 2020 · 2 comments
Open

Adding a few more basic commands to the server #48

Antwns opened this issue Nov 12, 2020 · 2 comments

Comments

@Antwns
Copy link

Antwns commented Nov 12, 2020

Is your feature request related to a problem? Please describe.
Yes. My project is based around the restart function of the server, aka after the .StartListening(), it would be great to have a .StopListening() method. (Would be great if this feature could also be implemented on the client too)

Describe the solution you'd like
Implementing a .StopListening() function and a .StopClient() function.

Additional content
It would also be great if the server could "kick" a client by disconnecting it, making the disconnect happen on the client side is less secure, would also help when the server is doing the .StopListening() function to "kick" all connected clients.

Thanks for reading 😄

@Cloet
Copy link
Owner

Cloet commented Nov 24, 2020

Some remarks:

  • The server can 'Kick' a client by using the Close(clientId) method.
  • The client has a function called 'Close()', this kills the client and raises the 'Disconnected' event.
  • The server can be disposed but does not raise any event.

If I understand correctly you'd like to pause the server/client by using 'StopListening()' and resume listening at a later point in time by calling 'StartListening()' again ?

@Antwns
Copy link
Author

Antwns commented Nov 24, 2020

Exactly! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants