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

Handling pingrequests #17

Open
kappsegla opened this issue Feb 2, 2024 · 0 comments · May be fixed by #46
Open

Handling pingrequests #17

kappsegla opened this issue Feb 2, 2024 · 0 comments · May be fixed by #46
Assignees
Labels
enhancement New feature or request

Comments

@kappsegla
Copy link
Contributor

kappsegla commented Feb 2, 2024

Problem Description

A connected client can send a PINGREQ and get a PINGRESP back to make sure the connection is alive.

PINGREQ
PINGRESP

if (buffer[0] == (byte) 0xC0) {
                    System.out.println("Received MQTT PINGREQ message from client");
                    byte[] pingrespMessage = new byte[]{(byte) 0xD0, (byte) 0x00};
                    outputStream.write(pingrespMessage);
                    outputStream.flush();
                    System.out.println("Sent MQTT PINGRESP message to client");
@kappsegla kappsegla added the enhancement New feature or request label Feb 2, 2024
@kappsegla kappsegla added this to the Connection handling milestone Feb 2, 2024
@yrlacornelia yrlacornelia self-assigned this Feb 5, 2024
@hannastigland hannastigland self-assigned this Feb 5, 2024
@hannastigland hannastigland linked a pull request Feb 9, 2024 that will close this issue
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 a pull request may close this issue.

3 participants