SimpleSocket for Windows Phone

is a wrap around the built in WP7.5 sockets that makes using socket connections incredibly easy and fast. It supports only the basic sending and reading of string data and is fully asynchronous and event driven. It is perfect for simple socket applications.

Example usage:

 

SimpleSocket socket = new SimpleSocket("127.0.0.1", 300);
//The event called when a new message is received
socket.MessageReceived += (string message) => {
    Console.WriteLine(message);
};
 //The event called when the socket is disconected
socket.ConnectionClosed += () => {
    Console.WriteLine("Disconected from the server");
};
socket.Connect();

//You can send string or byte data very easily
socket.Send("Hello!");

Last edited Dec 12, 2012 at 7:39 AM by DejanPelzel, version 14