pointeman
asked on
Sockets BeginConnect Pass String?
Q: Can I 'pass' a string in place of the 'null' param in the Sockets.BeginConnect method?
Q. If so, how do I retreived the string in the next method?
I generally find the state object either null or the actual socket name.
clientSocket.BeginConnect( ipEndPoint , new AsyncCallback(OnConnect), null);
private void OnConnect(IAsyncResult ar)
{
clientSocket.EndConnect(ar );
clientSocket.BeginSend(dat a, 0, data.Length, SocketFlags.None, new AsyncCallback(OnSend), null);
}
Q. If so, how do I retreived the string in the next method?
I generally find the state object either null or the actual socket name.
clientSocket.BeginConnect(
private void OnConnect(IAsyncResult ar)
{
clientSocket.EndConnect(ar
clientSocket.BeginSend(dat
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.