T
Tom
public class Client
{
public Server svr;
public void callbackMethod(IAsyncResult asyncResult)
{
svr.EndAsyncMethod(result)
}
[STAThread]
static void Main(string[] args)
{
svr = new Server();
object stateobj = new object();
Callback cb = new AsyncCallback(this.callbackMethod);
svr.BeginAsyncMethod(cb, stateobj);
}
}here's the code sambple above.. I don't get it.. what is the poing of new
AsyncCallback(this.callbackMethod); ? sorry but all this seems extremely
bloated to me right now.why make a call to
AsyncCallback(this.callbackMethod); with a reference of method in the
current class ?is it saying make callbackMethod async ?and why is there a
svr.EndAsyncMethod(result) in callbackMethod ?sorry just don't get itThanks
{
public Server svr;
public void callbackMethod(IAsyncResult asyncResult)
{
svr.EndAsyncMethod(result)
}
[STAThread]
static void Main(string[] args)
{
svr = new Server();
object stateobj = new object();
Callback cb = new AsyncCallback(this.callbackMethod);
svr.BeginAsyncMethod(cb, stateobj);
}
}here's the code sambple above.. I don't get it.. what is the poing of new
AsyncCallback(this.callbackMethod); ? sorry but all this seems extremely
bloated to me right now.why make a call to
AsyncCallback(this.callbackMethod); with a reference of method in the
current class ?is it saying make callbackMethod async ?and why is there a
svr.EndAsyncMethod(result) in callbackMethod ?sorry just don't get itThanks