This implement based from
- https://github.com/normj/netcore-simple-websockets-chat-app
- https://github.com/radu-matei/websocket-manager
- Amazon.Lambda.APIGatewayEvents Version 1.2.0 (This only version to support API Gateway Web Socket)
- MySQL for store Connection ID
- Create Environment Variables
- key: TEST_LAMBDA_DBCONNECTION
- value: server={HOST};userid={USERNAME};password={PASSWORD};database={DATABASE_NAME};convert zero datetime=True; CharSet=utf8;
-
Push to AWS Lambda
-
test on Web Socket Test Tools such as https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo?hl=en
-
connect and send data such as
{"action":"sendmessage","data":"hello"}
- I don't know how to test on localhost