Outbond websocket
ctmir
HOBBYOP

8 months ago

Hi there

I'm trying to use websockets. I went through the network document section.

From what I understand you can let external applications connect to your application but what if you want I want to do is use my application that's deployed on railway to listen to the following api for updates.

SOLANA_WS_URL=wss://api.mainnet-beta.solana.com

$10 Bounty

4 Replies

8 months ago

Can I get a tiny bit of info about your stack?


8 months ago

You can in your program "subscribe" and listen to that websocket just fine. For whatever language you are using look into documentation of connecting to websockets.


noahd

You can in your program "subscribe" and listen to that websocket just fine. For whatever language you are using look into documentation of connecting to websockets.

ctmir
HOBBYOP

8 months ago

Perfect! is there a specific post I can look at of railway of connecting to websockets?


ctmir

Perfect! is there a specific post I can look at of railway of connecting to websockets?

8 months ago

I looked and couldn't find any posts specifically of connecting to a websocket. However, Railway is your host. It isnt your service.
If you have a nodejs or python script and in the script you connect to a websocket railway can happily support that outbound traffic. Due to dynamic IP things (And the staff might have to correct me on this) you arent able to host the websocket on Railway.
Connecting is simple, just connect in your code's source!


Loading...