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

This lib is broken #8

Open
Evert-Arends opened this issue Jan 7, 2021 · 6 comments
Open

This lib is broken #8

Evert-Arends opened this issue Jan 7, 2021 · 6 comments

Comments

@Evert-Arends
Copy link

Evert-Arends commented Jan 7, 2021

Hello,

It seems that this lib looks really awesome, but in reality nothing seems to be working. Even the examples posted in the docs don't work at all, I tried nearly all python examples, and sometimes it works but most of the time I have to heavily edit the docs to get it working, and even then it seems not to be working correctly (spam and repeating messages).

Am I very stupid today or is this package just not working? (anymore).

Example:

from socketengine import Transport

transport = Transport(name='test')
transport.openForConnection(port=8080)
transport.write('channel_name', 'Hello World!')
transport.close()

Name was not in the documentation, but required, and when it finally runs:

/usr/bin/python3.6 /home/berm/Development/Hobby/test.py
Traceback (most recent call last):
  File "/home/berm/Development/Hobby/test.py", line 4, in <module>
    transport.openForConnection(port=8080)
AttributeError: 'Transport' object has no attribute 'openForConnection'

This is the documentation (Images, which I think is pretty weird for code?):
https://github.com/0xJeremy/socket.engine/raw/master/graphics/python_documentation/transport_example_1.png

@Evert-Arends
Copy link
Author

So sad because this was exactly what I needed for my usecase.

@0xJeremy
Copy link
Owner

0xJeremy commented Jan 7, 2021

Hey there. Currently the master branch is under some development (we're changing the way messages are sent and received). For the time being I would recommend using the latest release version. If you download the zip of the code from the release all the docs that come packages should be up to date, and the code there is fully tested and working.

Give this a shot and let me know! If it's still not working them I will take a closer look into the issue.

@Evert-Arends
Copy link
Author

Hey thanks for your reply!
If I run pip show socket-engine i get the following:

Name: socket.engine
Version: 1.0.0
Summary: A universal communication engine
Home-page: https://github.com/0xJeremy/socket.engine
Author: Jeremy Kanovsky
Author-email: kanovsky.jeremy@gmail.com
License: UNKNOWN
Location: /usr/lib/python3.6/site-packages

@Evert-Arends
Copy link
Author

Evert-Arends commented Jan 7, 2021

Okay, so I removed the package and downloaded the zip file v1 found in releases, and installed it with the following commands:

unzip python.zip
sudo python3.6 -m pip install -e /home/berm/Downloads/python

The code seems to be working, but the host keeps spamming the same message, even when the client dissconnects with the example code provided.

Host output (*1000 more in reallife, it spams)

client is connected!
client is connected!
client is connected!
client is connected!
client is connected!

Host:

from socketengine import host

h = host()
h.start()

while True:
    data = h.get_ALL("test")

    if data is not None:
        for item in data:
            print(item)
            break
h.close()

Client:

from socketengine import client

c = client()
c.start()

c.write("test", "client is connected!")

c.close()

@lix2k3
Copy link

lix2k3 commented Mar 18, 2021

can confirm this continues to happen. It infinitely sends the message over and over again to no end.

@dengliyuan
Copy link

the same issue

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

4 participants