Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukicdarkoo/ldsocket
C# library that allows easy client-server communication
https://github.com/lukicdarkoo/ldsocket
Last synced: 10 days ago
JSON representation
C# library that allows easy client-server communication
- Host: GitHub
- URL: https://github.com/lukicdarkoo/ldsocket
- Owner: lukicdarkoo
- Created: 2013-03-12T12:20:29.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-07-26T11:37:43.000Z (over 10 years ago)
- Last Synced: 2023-07-31T12:14:56.049Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 230 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ldsocket
========Class which makes communication between two C# application in network easy.
REQUIREMENTS
------------.NET 2.0 or higher
INSTALATION
-----------Add new class to your project, name it `LDSocket.cs` and paste code from `LDSocket.cs`
EXAMPLE - SERVER
----------------using LDSocket;
.....
namespace Example
{
public partial class MainWindow : Window
{
LDSocket.SocketServer server;
public MainWindow()
{
server = new LDSocket.SocketServer();
server.DataReceived += new SocketServer.DataReceivedHandler(server_DataReceived);
}
void server_DataReceived(string data, int index)
{
//data received from client and index
}
void sendMessage(string msg)
{
server.sendMessage(msg); //sends message to all clients
server.sendMessage(msg, 2); //sends message only to client with index 2
}
}
}