Re: What's the difference?
Quote:
Originally posted by Hinder
Dealing with Asyncronous Sockets, I am wondering what the difference between these 2 calls are..
Code:
Handler.BeginReceive(State.RBuff, 0, State.PacketSize, SocketFlags.None, New AsyncCallback(AddressOf ReceiveLock), State)
And this one?
Code:
Handler.BeginReceive(State.RBuff, 0, State.PacketSize, SocketFlags.None, AddressOf ReceiveLock, State)
They are both Asyncronous calls, I see some examples that use the "New AsyncCallback(AddressOf Method)" and some I just see "AddressOf Method", Is there any signifigant different? I tried both ways and they both seem to operate the same..
Just wondering
The only difference is the ReceiveLock variable is being declared in the method call in the first. In the second its already declared so they just pass it in.
Re: Re: What's the difference?
Quote:
Originally posted by DevGrp
The only difference is the ReceiveLock variable is being declared in the method call in the first. In the second its already declared so they just pass it in.
Hmm so let me get this straight then, The first one actually creates and uses it's OWN copy of the method ReceiveLock and runs it in its own space? The second one uses the "real" address of the method in the source? So the second one is like calling a Shared method then right?