Q:

System.Net.Socket.Socket.AcceptAsync equivalent in silverlight

I have this method in .net
    public static SocketAwaitable AcceptAsync(this Socket socket,
                                              SocketAwaitable awaitable)
    {
        awaitable.Reset();
        if (!socket.**AcceptAsync(awaitable.EventArgs))**
            awaitable.WasCompleted = true;
        return awaitable;
    }

Porting this code into silverlight results in this error

Error 1   'System.Net.Sockets.Socket' does not contain a definition for 'AcceptAsync' and the best extension method overload 'SLAsyncAwaitSocketProxy.SocketExtensions.AcceptAsync(System.Net.Sockets.Socket, SLAsyncAwaitSocketProxy.SocketAwaitable)' has some invalid arguments    

From what i understand, silverlight doesnt have System.Net.Socket.Socket.AcceptAsync. Are there any equivalent method that i can use? Any advice?

A:

Accept is used to receive incoming socket connections; this is not possible on Silverlight or most other hosted platforms for security reasons.
You'll need to connect from your Silverlight app to a server instead. Once a connection is made, data can flow bidirectionally.
One possible alternative is SignalR.

