rdavisau / sockets-for-pcl

Cross-platform socket API for Xamarin iOS/Android/Forms, Xamarin.Mac/MonoMac, Windows Phone 8/8.1, Windows Store and Windows Desktop.
MIT License
223 stars 72 forks source link

TcpSocketListener stops receive after first time #154

Open Tical- opened 6 years ago

Tical- commented 6 years ago

Hi, TcpSocketListener stops receive after first time.

public TcpSocketListener listener; var listenPort = 8912; listener = new TcpSocketListener(); listener.ConnectionReceived += DO; AsyncHelpers.RunSync(async () => await listener.StartListeningAsync(listenPort));

I try to reinit this. Do not working: listener.StopListeningAsync(); listener.Dispose(); listener = new TcpSocketListener(); listener.ConnectionReceived += DO; AsyncHelpers.RunSync(async () => await listener.StartListeningAsync(8912)); listener.ConnectionReceived += DO; I dont know, why

bilalsammour commented 5 years ago

For me too