hi every one please any one tell me how can i create connection with websocket in our c# application.
Actually i want to implement Card payment system in our EPOS application.
so i need to create connection with websocket but i don't know how can i do it.
i also found one link of webscoket in c#
but i cannot understand it clearly.
This is the Websocket Connection URI:
wss:
I need to maintain that connection in our EPoS
in a background thread
i also get some information related to websocket but i dont know how can i implement it in our application.
"
whenever something arrives on that message, or you want to post a message
you just pass it on to the websocket client
ws.Send ("BALUS");
{
"jsonrpc": "2.0",
"method": "connectedTerminals",
"id": 1
}
i'm a biggner please i wait for some one help
What I have tried:
i have found this code but i dont know how can i implete this in our application
using System;
using WebSocketSharp;
namespace Example
{
public class Program
{
public static void Main (string[] args)
{
using (var ws = new WebSocket ("ws://dragonsnest.far/Laputa")) {
ws.OnMessage += (sender, e) =>
Console.WriteLine ("Laputa says: " + e.Data);
ws.Connect ();
ws.Send ("BALUS");
Console.ReadKey (true);
}
}
}
}