J
Johan
Why is the parameter remoteEP of the function Socket.ReceiveFrom() a
ref parameter and not an out parameter?
http://msdn2.microsoft.com/en-us/library/wdfskwcy.aspx
public int ReceiveFrom (
byte[] buffer,
ref EndPoint remoteEP
)
I think it should be a out parameter, because the function doesn't use
the value. It only puts information about the remote end in this
class. In most examples the EndPoint is initialised like this:
IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);
But this doesn't do anything (right?). I think it is only used to keep
the compiler happy.
ref parameter and not an out parameter?
http://msdn2.microsoft.com/en-us/library/wdfskwcy.aspx
public int ReceiveFrom (
byte[] buffer,
ref EndPoint remoteEP
)
I think it should be a out parameter, because the function doesn't use
the value. It only puts information about the remote end in this
class. In most examples the EndPoint is initialised like this:
IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);
But this doesn't do anything (right?). I think it is only used to keep
the compiler happy.