Why do you import namespaces that you aren't using Threading, Threading.Tasks, Text, Linq and Collections.Generic?
Also you don't need to do
new AsyncCallback(function).
You can just do:
Code:
Socket.BeginAccept(AcceptCallback, null);
^same for BeginReceive etc.