Comments (1)
There is a typo in the opening JSON query. You have missed one of the opening square brackets.
{"ApiKey":"...","BoundingBoxes": [ [[-90,-180],[90,180]]]}
For me receiving stream from Websocat works:
$ /opt/websocat -v wss://stream.aisstream.io/v0/stream
[INFO websocat::lints] Auto-inserting the line mode
[INFO websocat::stdio_threaded_peer] get_stdio_peer (threaded)
[INFO websocat::ws_client_peer] get_ws_client_peer
[INFO websocat::ws_client_peer] Connected to ws
{"APIKey":"xxxxxxxxx","BoundingBoxes":[[[-90,-180],[90,180]]]}
{"Message":{"PositionReport":{"Cog":169.6,"CommunicationState":59916,"Latitude":57.37234333333333,"Longitude":16.556225,"MessageID":1,"NavigationalStatus":0,"PositionAccuracy":true,"Raim":false,"RateOfTurn":0,"RepeatIndicator":0,"Sog":0,"Spare":0,"SpecialManoeuvreIndicator":0,"Timestamp":7,"TrueHeading":237,"UserID":265518880,"Valid":true}},"MessageType":"PositionReport","MetaData":{"MMSI":265518880,"ShipName":"RESCUE BURRE ","latitude":57.37234333333333,"longitude":16.556225,"time_utc":"2023-06-02 21:18:06.571796395 +0000 UTC"}}
{"Message":{"StaticDataReport":{"MessageID":24,"PartNumber":true,"RepeatIndicator":0,"ReportA":{"Name":"","Valid":false},"ReportB":{"CallSign":"","Dimension":{"A":9,"B":7,"C":3,"D":3},"FixType":1,"ShipType":37,"Spare":0,"Valid":true,"VenderIDModel":1,"VenderIDSerial":5,"VendorIDName":"GRM"},"Reserved":0,"UserID":338051706,"Valid":true}},"MessageType":"StaticDataReport","MetaData":{"MMSI":338051706,"ShipName":"","latitude":25.731025,"longitude":-80.22980833333332,"time_utc":"2023-06-02 21:18:06.572271422 +0000 UTC"}}
{"Message":{"StandardClassBPositionReport":{"AssignedMode":false,"ClassBBand":true,"ClassBDisplay":false,"ClassBDsc":true,"ClassBMsg22":true,"ClassBUnit":true,"Cog":337.7,"CommunicationState":393222,"CommunicationStateIsItdma":true,"Latitude":25.739915,"Longitude":-80.16492166666667,"MessageID":18,"PositionAccuracy":true,"Raim":true,"RepeatIndicator":0,"Sog":0,"Spare1":0,"Spare2":0,"Timestamp":6,"TrueHeading":511,"UserID":378112381,"Valid":true}},"MessageType":"StandardClassBPositionReport","MetaData":{"MMSI":378112381,"ShipName":"OBSESSION","latitude":25.739915,"longitude":-80.16492166666667,"time_utc":"2023-06-02 21:18:06.572688109 +0000 UTC"}}
...
I also received {"error": "Subscription Object Is Malformed"}
message from the service which suggested the mistake. Was is not the case for you? You are also recommended to use -v
option when debugging Websocat issues to see when it connects and when disconnects from the socket.
from websocat.
Related Issues (20)
- provide interface that accepts `Opts` and `std::process::Stdio` HOT 3
- Binary response frames are not handled well HOT 5
- Binary Frames support HOT 8
- websocat.x86_64-unknown-linux-musl on Ubuntu is seems to end before a message is received? HOT 4
- Specify server TLS certificate HOT 2
- "dropped a ping request from websocket due to channel contention" HOT 2
- Specify TLS hostname separately from connect hostname HOT 2
- Refersh header while interractive session is in progress HOT 15
- Question: how do websocat know the other one reached EOF ?
- How do websocat know the other one reached EOF ? HOT 3
- Print more details on I/O failure
- websocat does not report errors when the connection dies HOT 1
- Is there any way to print plain text of request and response when connecting to wss endpoint ? HOT 1
- Pkcs12 compatibility issues on OpenSSL 1.x.x HOT 5
- Consider allowing basic auth to be passed in environment variable to hide it from the rest of users HOT 4
- Saving Response from Websocat on windows OS HOT 1
- [v1.13.1] Release Date Request HOT 3
- Websocat client cannot connect even though wscat does? HOT 2
- pipe commands to websocat? HOT 3
- Cannot install in Fedora 40 container HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websocat.