-
Notifications
You must be signed in to change notification settings - Fork 4
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
new-ws-echo client anything happens #4
Comments
test_ws_server - OnCloseConnection called, fd: 1025, status_code 1006, reason: |
I ran a simple ws server on python. Try to test: test_ws_client, but happens next: data hash: 12542905821436587693 Prepare to send handshake request IN custom_bio_write, fd:1025 written: -1 |
Timecounters tick every 10.000 msec OnCloseConnection called, fd: 1025, status_code 1006, reason: |
Hi, it will help if you can provide the simplest code that can reproduce your errors. What's more, have you tried to use the non f-stack (which uses the OS net stack) build option? |
Hi, sure. I used code from tests.
https://github.com/renzibei/flashws/blob/master/tests/new-ws-echo/test_def.h My changes:
https://github.com/renzibei/flashws/blob/master/tests/new-ws-echo/test_ws_client.cpp My changes: line 424
https://github.com/renzibei/flashws/blob/master/tests/new-ws-echo/config_la1_2.ini Rename to config.ini My changes: For generation pcap
I try config this settings by command ifconfig
Then I go to tests/build compile your tests:
Run
It execute very long, nothing happen, pcap and log_data.csv always empty.
Always return 1006 code. I try to connect to ws server (test_ws_server). I try to connect to custom server that I wrote. Nothing works. code: 1006 |
I use AWS EC2 instance. In my task DPDK usage is required. |
Here are a few points that might help clarify the problem:
To debug and identify the cause of the failure, you can try the following:
|
Could implement WebSocket Client ? I think for you it not hard. I researched your repositories and saw that you solve complex tasks. |
Hello. The basic WebSocket client has already been implemented in the flashws library. The This means that the WebSocketClient you mentioned is already available. If you need to use it for other purposes—such as sending messages from a WebSocket client to a WebSocket server—you can refer to the In my opinion, the echo server and client example is already the easiest and most straightforward way to demonstrate how to use the WebSocket client. Any other example would just involve minor modifications to the application logic. |
I did everything as you wrote. I modified the tests to my needs but nothing works. |
I call this issue: |
@renzibei My friend. Could you implement example how to connect to ws server and listen ? |
I understand your frustration. The coding part itself is quite simple. My suggestion would be to take the code from However, the more challenging part is likely the network setup rather than the coding itself. Network configurations can be tricky, and every environment is different, so I can't provide a one-size-fits-all solution. My best advice remains the same:
Once you verify that the base setup is working, adapting the WebSocket client should be straightforward. |
@renzibei Chatgpt has a hard time porting this code. I'm not a bad person to modify it myself. How to debug this, how to understand at what stage everything went wrong? Ok I try. Thank you my friend. |
@renzibei Ok I don't want to spent a lot of time right now. |
https://github.com/renzibei/flashws/blob/master/include/flashws/net/ws_client_socket.h |
Hi. I configured dpdk and f-stack, build testes.
When I try run test_ws_client, I have next:
Checking link statusdone
Port 0 Link Up - speed 0 Mbps - full-duplex
link_elf_lookup_symbol: missing symbol hash table
link_elf_lookup_symbol: missing symbol hash table
Timecounters tick every 10.000 msec
WARNING: Adding ifaddrs to all fibs has been turned off by default. Consider tuning net.add_addr_allfibs if needed
Attempting to load tcp_bbr
tcp_bbr is now available
TCP Hpts created 1 swi interrupt threads and bound 0 to cpus
Timecounter "ff_clock" frequency 100 Hz quality 1
TCP_ratelimit: Is now initialized
f-stack-0: Addr6: ff::02
f-stack-0: Gateway6: ff::01
f-stack-0: Ethernet address: 0a:1c:05:63:12:29
f-stack-0: Successed to register dpdk interface
Set host: 3.114.215.96, port: 443, data file path: ./log_data.csv
Creating a new client...
request_uri = /ws/btcusdt@depth5@100ms, host = 3.114.215.96:443
Starting event loop...
OnCloseConnection called, fd: 1025, status_code 1006, reason:
I don't understand it wrong on code side, or maybe it happens because I have wrong in my configuration. I setup pcap file generation, but it empty and log_data.csv too.
The text was updated successfully, but these errors were encountered: