Skip to content

huffSamuel/AutoDiscovery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AutoDiscovery

AutoDiscovery is a .NET library for client/server discovery via UDP.

Under update. The current version has some significant shortcomings that will be addressed in version 1.1.

Nuget

Installation

PM> Install-Package AoBD.AutoDiscovery

Requirements

.NET Framework 4.5

Use

Create a server:

IServer server = new Server(16000);
server.ClientConnected += OnClientConnected;
server.Start();
// Go about your work here
server.Stop();

Create a client:

int pollingTime = 2000;
IClient client = new Client(16000, pollingTime);
client.ServerDiscovered += OnServerDiscovered;
client.Start();
// Go about your work here
client.Stop();

The server will discover clients that are broadcasting to the network and notify the consumer via the ClientConnected event; likewise the client will notify via the ServerDiscovered event.

Communication is not managed at this point and clients will broadcast and servers will listen until Stop() is called. If not managed correctly this will lead to duplicate server/client discovery.

Support

Please submit issues via the issue tracker.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT