Answered by:
2 way communication using Stream Socket (TCP like)

Question
-
I created a client and a server(listener) using StreamSocket .In server StreamSocketListener are assigned the ConnectionReceivedevent to an event handler. Client can connect and send data successfully to sever and server(listener) also able to receive it. But server(StreamSocketListener) can not send "Reply" to client(StreamSocket).
Client knows server IP & port and how server send reply to client after receiving message from client?
I able to get source IP & port address inside the server but failed to send reply. How can server give the response ??
By the way, Is it possible to send and receive simultaneously at same time using same socket in WinRT ???
- Edited by Mokarrom Hossain Monday, August 13, 2012 5:09 PM
Thursday, August 9, 2012 3:54 PM
Answers
-
String^ rhost=UdpSocket->Information->RemoteAddress->RawName;
- Proposed as answer by Jesse Jiang Thursday, August 16, 2012 3:13 AM
- Marked as answer by Jesse Jiang Friday, August 24, 2012 7:02 AM
Friday, August 10, 2012 5:21 PM -
Take a look at the C++ sample at http://code.msdn.microsoft.com/windowsapps/StreamSocket-Sample-8c573931
The connection received event will give you the newly connected socket; you should be using that to read and write, not the StreamSocketListener socket.
Network Developer Experience Team (Microsoft)
- Marked as answer by Jesse Jiang Friday, August 24, 2012 7:02 AM
Saturday, August 18, 2012 1:37 AM
All replies
-
String^ rhost=UdpSocket->Information->RemoteAddress->RawName;
- Proposed as answer by Jesse Jiang Thursday, August 16, 2012 3:13 AM
- Marked as answer by Jesse Jiang Friday, August 24, 2012 7:02 AM
Friday, August 10, 2012 5:21 PM -
Take a look at the C++ sample at http://code.msdn.microsoft.com/windowsapps/StreamSocket-Sample-8c573931
The connection received event will give you the newly connected socket; you should be using that to read and write, not the StreamSocketListener socket.
Network Developer Experience Team (Microsoft)
- Marked as answer by Jesse Jiang Friday, August 24, 2012 7:02 AM
Saturday, August 18, 2012 1:37 AM