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

Server responses are occasionally fragmented. #2

Open
Bigjango13 opened this issue Apr 24, 2022 · 0 comments
Open

Server responses are occasionally fragmented. #2

Bigjango13 opened this issue Apr 24, 2022 · 0 comments

Comments

@Bigjango13
Copy link

Bigjango13 commented Apr 24, 2022

I used the example simple-server and used this code to ping it:

import socket

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("localhost", 60))
s.sendall(b'\x00\x00')

data = b" "
while data != b"":
    data = s.recv(4096)
    print(data)

I received four different types of output.

b'\x00'
b'\x0f\x00\x00\x00\x00\x00\x00\x00Hello From "/"!'
b''
b'\x00\x0f\x00\x00\x00\x00\x00\x00\x00Hello From "/"!'
b''
b'\x00'
b'\x0f\x00\x00\x00\x00\x00\x00\x00'
b'Hello From "/"!'
b''
b'\x00\x0f\x00\x00\x00\x00\x00\x00\x00'
b'Hello From "/"!'
b''
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

1 participant