Replies

Manisit
10 Mar 2024, 15:52 ( Updated at: 11 Mar 2024, 07:41 )

RE: RE: simple code Websocket on cBots

Manisit said: 

firemyst said: 

"However, the problem is that when I tried copying the code to use, it resulted in errors, and there are no examples for me to follow."

Have you even tried Google?

A simple search on “c# websocketclient example” brings back a list of websites, and the first one (medium.com) has a complete example including how to add it to your project using the NuGet package manager.

https://www.google.com/search?q=c%23+websocketclient+example&sca_esv=8b94fdf9c54254b4&source=hp&ei=PyTtZbCOE6TP7_UPoLuc4Ag&iflsig=ANes7DEAAAAAZe0yT3nG5JowWnfbTh6aAtNPKXoeGw1O&oq=c%23+webSocketClient&gs_lp=Egdnd3Mtd2l6IhJjIyB3ZWJTb2NrZXRDbGllbnQqAggBMgUQABiABDIGEAAYFhgeMgsQABiABBiKBRiGAzILEAAYgAQYigUYhgMyCxAAGIAEGIoFGIYDSP1CUABYgR5wAHgAkAEAmAH3AaABqByqAQYwLjExLje4AQPIAQD4AQGYAhKgAtYcwgIOEC4YgAQYsQMYxwEY0QPCAggQABiABBixA8ICCxAAGIAEGLEDGIMBwgILEC4YgAQYsQMYgwHCAggQABgWGB4YCpgDAJIHBTAuOS45oAeOUA&sclient=gws-wiz

 

I've attempted to use other WebSocket client libraries that I've previously developed .NET apps with. However, they fail to connect to the WebSocket server. I don't understand if there's anything additional I need to set to allow this?

Development isn't hard for me, it's just that I still don't understand what your system entails, what can be used, and there are very few examples

 

 

Currently, I can fix it by modifying this topic

[Robot(AccessRights = AccessRights.None)]

Modified to

[Robot(AccessRights = AccessRights.FullAccess)]


@Manisit

Manisit
10 Mar 2024, 10:14 ( Updated at: 10 Mar 2024, 15:21 )

RE: simple code Websocket on cBots

firemyst said: 

"However, the problem is that when I tried copying the code to use, it resulted in errors, and there are no examples for me to follow."

Have you even tried Google?

A simple search on “c# websocketclient example” brings back a list of websites, and the first one (medium.com) has a complete example including how to add it to your project using the NuGet package manager.

https://www.google.com/search?q=c%23+websocketclient+example&sca_esv=8b94fdf9c54254b4&source=hp&ei=PyTtZbCOE6TP7_UPoLuc4Ag&iflsig=ANes7DEAAAAAZe0yT3nG5JowWnfbTh6aAtNPKXoeGw1O&oq=c%23+webSocketClient&gs_lp=Egdnd3Mtd2l6IhJjIyB3ZWJTb2NrZXRDbGllbnQqAggBMgUQABiABDIGEAAYFhgeMgsQABiABBiKBRiGAzILEAAYgAQYigUYhgMyCxAAGIAEGIoFGIYDSP1CUABYgR5wAHgAkAEAmAH3AaABqByqAQYwLjExLje4AQPIAQD4AQGYAhKgAtYcwgIOEC4YgAQYsQMYxwEY0QPCAggQABiABBixA8ICCxAAGIAEGLEDGIMBwgILEC4YgAQYsQMYgwHCAggQABgWGB4YCpgDAJIHBTAuOS45oAeOUA&sclient=gws-wiz

 

I've attempted to use other WebSocket client libraries that I've previously developed .NET apps with. However, they fail to connect to the WebSocket server. I don't understand if there's anything additional I need to set to allow this?

Development isn't hard for me, it's just that I still don't understand what your system entails, what can be used, and there are very few examples

 


@Manisit

Manisit
10 Mar 2024, 06:39 ( Updated at: 10 Mar 2024, 15:21 )

RE: simple code Websocket on cBots

firemyst said: 

"However, the problem is that when I tried copying the code to use, it resulted in errors, and there are no examples for me to follow."

Have you even tried Google?

A simple search on “c# websocketclient example” brings back a list of websites, and the first one (medium.com) has a complete example including how to add it to your project using the NuGet package manager.

https://www.google.com/search?q=c%23+websocketclient+example&sca_esv=8b94fdf9c54254b4&source=hp&ei=PyTtZbCOE6TP7_UPoLuc4Ag&iflsig=ANes7DEAAAAAZe0yT3nG5JowWnfbTh6aAtNPKXoeGw1O&oq=c%23+webSocketClient&gs_lp=Egdnd3Mtd2l6IhJjIyB3ZWJTb2NrZXRDbGllbnQqAggBMgUQABiABDIGEAAYFhgeMgsQABiABBiKBRiGAzILEAAYgAQYigUYhgMyCxAAGIAEGIoFGIYDSP1CUABYgR5wAHgAkAEAmAH3AaABqByqAQYwLjExLje4AQPIAQD4AQGYAhKgAtYcwgIOEC4YgAQYsQMYxwEY0QPCAggQABiABBixA8ICCxAAGIAEGLEDGIMBwgILEC4YgAQYsQMYgwHCAggQABgWGB4YCpgDAJIHBTAuOS45oAeOUA&sclient=gws-wiz

 

I understand how to write a WebSocket client, but the problem is that I still don't understand what your system allows.

Can I use external libraries, or are there any built-in functions available?

Because when I try writing it in my way, it can't connect to the mock WebSocket server


@Manisit