Subazzz-3626 avatar image
0 Votes"
Subazzz-3626 asked Subazzz-3626 commented

Create multiple connections using Stream Socket

I have two separate uwp apps which run as Server and Client. I installed Server app in one machine and Client app in 3 machines. I need to share a file from Server app to Client app. When I shared the file

  • Sometimes it is not shared to all the apps.

  • Sometimes one app is crashed and closed.

  • Sometimes I get "Only one usage of each socket address (protocol/network address/port) is normally permitted for multiple socket connections in uwp" exception when the file is not shared.

I think we can't have multiple separate sockets open on the same IP address / port.Then how can we define dynamic port range for multiple connections for above scenario?

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

For your scenario, you could make a list to store all client socket, if you want to send message to all clients , you just foreach list get all client socket and the write data into output stream.

1 Vote 1 ·

Hi, is above comment helpful for your requirement?

0 Votes 0 ·

Yes, It is. Thank you.

0 Votes 0 ·

0 Answers