You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
1 week ago | |
|---|---|---|
| .. | ||
| Readme.md | 1 week ago | |
| chat.html | 1 week ago | |
| index.html | 1 week ago | |
| ws-demo.html | 1 week ago | |
Readme.md
OpenIM Web E2E
Minimal local web page for exercising OpenIM HTTP message APIs from a browser.
Usage:
cd /Users/ren_yu/open-source/open-im-server/test/e2e/web
python3 -m http.server 18080
Open http://127.0.0.1:18080 after the OpenIM server is running.
Pages:
http://127.0.0.1:18080/- token and message API testerhttp://127.0.0.1:18080/chat.html- simplest dev chat clienthttp://127.0.0.1:18080/ws-demo.html- simplest native browser OpenIM WS client
Default local endpoints:
- API:
http://127.0.0.1:10002 - WebSocket gateway:
ws://127.0.0.1:10001
Defaults from this repo:
- admin user ID:
imAdmin - secret:
openIM123
Notes:
/auth/get_admin_tokenrequires the admin user to already exist./msg/send_msgrequires an admin token in thetokenheader.- The included page currently sends plain text messages through
/msg/send_msg. chat.htmlis a development-only client: it uses admin-backed APIs to send and search messages between two users.ws-demo.htmlperforms a real browser WebSocket handshake and sends OpenIM WS envelopes over binary frames.- The WS gateway in this repo currently expects
isBackground=falsein the query string; omitting it causes the handshake to fail before upgrade.
Debugging:
cd /Users/ren_yu/open-source/open-im-server
./scripts/debug_msggateway_ws.sh before-rpc
gatewaystops at the WS gateway after the envelope is decoded.before-rpcstops right beforeg.msgClient.MsgClient.SendMsg(...).after-rpcstops right afterg.msgClient.MsgClient.SendMsg(...)returns.- These breakpoints only apply to
ws-demo.html, notchat.htmlor/msg/send_msg.