Okay, I gave WebSocket4Net a go, and it seems to work pretty well. From what I can see, it’s staying connected, which is a good start! It also appears to send the JSON message for bits.
I read on the API that when I send the JSON message, I’ll receive a message in return. However, this doesn’t appear to be the case. I don’t receive any messages, or data (but I’m also not receiving any errors). It logs that the connection was opened, and also logs when the connection closes, so I know it’s definitely staying connected this time, so using WebSocket4Net seems like a good start.
The JSON message I’m trying to send has a LISTEN command, to listen for any cheers that come through. I’m not partnered on Twitch, so I don’t have the OAuth key or anything else to test it, so I left it empty. I at least expected an error, or message back though (which the Documentation specifies will happen). So either the message isn’t getting through, or maybe I did the formatting wrong.
var messageSubscribe = @"
{
""type"": ""LISTEN"",
""nonce"": ""somerandomstring"",
""data"": {
""topics"": [""channel-bitsevents.38197393""],
""auth_token"": """",
}
}
";
I know that the way I’ve written it is probably terrible, but it was the fastest way, and ya know, fast is great for programming… I would put a Kappa emote but the developer forums don’t have it!?
Anyway, as stated I’d expect at least an error if the formatting was wrong or something.
Thanks again for the help!