development environment : C#, Windows
Connecting to solana-mainnet web server using wss address.
wss = new WebSocketSharp.WebSocket(this.Address);
wss.SslConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls12;
wss.OnMessage += (sender, e) =>
{
if (e.IsBinary)
{
HandleMessage(Opcode.Binary, e.RawData);
}
else if(e.IsText)
{
HandleMessage(Opcode.Text, e.RawData);
}
};
wss.OnOpen += (sender, e) =>
{
HandleOpen();
};
wss.OnError += (sender, e) =>
{
HandleError(e.Exception);
};
wss.OnClose += (sender, e) =>
{
HandleClose(e.Code, e.Reason);
};
OnMessage occurs when the solana balance changes. (At this time, I check solana balance.)
However, if there is a change in the spl-token balance, there is no event.
Therefore, I am periodically checking the spl-token.
This is very inefficient
how to detect spl-token balance change?
Best regards,