jugador Posted July 5, 2021 Share Posted July 5, 2021 Windows7 not supported websocket. So have to rely on 3rd party exe/dll. while searching forum not find any code that releted to window7 websocket. and no UDF on websocket till date. @Danyfirex started a thread https://www.autoitscript.com/forum/topic/182266-would-be-usefull-create-a-websocket-udf/ but he drop it. @FireFox example base on Windows8 https://www.autoitscript.com/forum/topic/84133-winhttp-functions/?do=findComment&comment=1172353 So try Google about websocket find this link https://github.com/uNetworking/uWebSockets https://github.com/BlueBrain/Rockets but it's written in c++ and I don’t know c++.In fact I don’t know any language except Autoit. It will be usefull if someone can provide a example how to do it on windows7. Thanks. Link to comment Share on other sites More sharing options...
Danp2 Posted July 5, 2021 Share Posted July 5, 2021 FWIW, I recently created a github repo with a slightly modified version of @FireFox's code, which can be found here. I know this doesn't help you, but maybe someone else will benefit. 😉 Have you considered upgrading to Windows 10? jugador 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
jugador Posted July 5, 2021 Author Share Posted July 5, 2021 @Danp2 no plan to upgrade to windows10 but it will definitely help other who are using windows higher version. Link to comment Share on other sites More sharing options...
jugador Posted July 5, 2021 Author Share Posted July 5, 2021 (edited) I don’t know if it’s safe or not curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: echo.websocket.org" -H "Origin:http://www.websocket.org" http://echo.websocket.org response HTTP/1.1 101 Web Socket Protocol Handshake Upgrade: WebSocket Connection: Upgrade WebSocket-Origin: http://www.websocket.org WebSocket-Location: ws://echo.websocket.org/ Server: Kaazing Gateway .......... .......... now how to proceed from here? look like I can't Quote But apart from being usable to test the initial handshake curl has no support for Websockets, i.e. it is impossible to actually exchange data using Websockets with curl. Edited July 6, 2021 by jugador Link to comment Share on other sites More sharing options...
jugador Posted July 6, 2021 Author Share Posted July 6, 2021 just a thought can WebSockets.Client.dll be use using @LarsJ DotNet UDF for this purpose. https://docs.microsoft.com/en-us/dotnet/api/system.net.websockets?view=net-5.0 https://docs.microsoft.com/en-us/dotnet/api/system.net.websockets.clientwebsocket?view=net-5.0 Link to comment Share on other sites More sharing options...
Danp2 Posted July 6, 2021 Share Posted July 6, 2021 Did you read the remarks section? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
jugador Posted July 7, 2021 Author Share Posted July 7, 2021 https://github.com/PingmanTools/System.Net.WebSockets.Client.Managed Link to comment Share on other sites More sharing options...
argumentum Posted July 7, 2021 Share Posted July 7, 2021 ...if you found the solution, would you share a sample code ( au3 & PHP ) for us to play around with ? Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
jugador Posted July 7, 2021 Author Share Posted July 7, 2021 (edited) @argumentum I am not coder by profession so finding solution on my own is impossible. but I will do post if I find anything interesting but rubbish to fellow coder. This a command line tool written in Rust https://github.com/vi/websocat Edited June 19, 2022 by jugador argumentum 1 Link to comment Share on other sites More sharing options...
jugador Posted July 9, 2021 Author Share Posted July 9, 2021 https://github.com/G33kDude/WebSocket.ahk https://github.com/pdckxd/WebSocketAsioAHK Link to comment Share on other sites More sharing options...
jugador Posted July 21, 2021 Author Share Posted July 21, 2021 Using Chilkat WebSocket try initial handshake with www.websocket.org got message WebSocket connection successful. now to see if I can code exchange data part. Link to comment Share on other sites More sharing options...
TheXman Posted July 21, 2021 Share Posted July 21, 2021 (edited) www.websoket.org is their website. Their websocket echo test server is wss://echo.websocket.org. If I were going to be testing my websocket logic, I would use the echo server. Are you trying to create a websocket client, server, or both? Edited July 21, 2021 by TheXman CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
jugador Posted July 21, 2021 Author Share Posted July 21, 2021 @TheXman I have no knowledge on WebSocket. So don’t know much about what to look for and type of security risk involve when using WebSocket. Me shouting loudly for WebSocket as I want to fetch data from few site. Pm you the testing code. It will be great for me if you look into it and rectify if wrong . Link to comment Share on other sites More sharing options...
jugador Posted July 22, 2021 Author Share Posted July 22, 2021 able to Send and Receive Frame and properly close websocket. TheXman 1 Link to comment Share on other sites More sharing options...
jugador Posted July 24, 2021 Author Share Posted July 24, 2021 (edited) Succeed in Sending and receiving BinaryData using Chilkat own Bindata option. but failed using Autoit Binary command. In Chilkat SendFrameBd (=> to send Binary data) need object. so how do I convert ($o_JpgPath) to object Local $o_JpgPath = @ScriptDir & '\circle.jpg' Local $o_Fopen = FileOpen($o_JpgPath, 16) Local $o_Fread = Binary(FileRead($o_Fopen)) FileClose($o_Fopen) ConsoleWrite('Number of bytes: ' & BinaryLen($o_Fread) & @CRLF) and to receive data it need binary object but this way it fail Local $o_Binary = Binary("") ConsoleWrite('VarGetType($o_Binary): ' & VarGetType($o_Binary) & @CRLF) Edited July 24, 2021 by jugador Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now