Skip to content

Instantly share code, notes, and snippets.

@lukasz-pyrzyk
Created March 13, 2016 20:06
Show Gist options
  • Save lukasz-pyrzyk/96443b30c941ad3c7f08 to your computer and use it in GitHub Desktop.
Save lukasz-pyrzyk/96443b30c941ad3c7f08 to your computer and use it in GitHub Desktop.
Decompiled code from TcpListener.
[HostProtection(SecurityAction.LinkDemand, ExternalThreading = true)]
public Task<Socket> AcceptSocketAsync()
{
return Task<Socket>.Factory.FromAsync(new Func<AsyncCallback, object, IAsyncResult>(this.BeginAcceptSocket), new Func<IAsyncResult, Socket>(this.EndAcceptSocket), (object) null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment