✅ Socket not Listen
Hello
when i call OnClientConnected() my console close. Yet, my socket listens well for 100 sec, but the console not wait my client connexion
You have an idea ?
Thanks you !
8 Replies
Hi,
private static async void OnClientConnected() is a async method which will run async.
you should call is using: await OnClientConnected();
Thanks, i do declare my Main method async ?
Ok, it working !
I declare my Main method as static async Task Main(string[] args)
@slycex correct you wanna go async all the way up the calling stack
Yup !

Here is the final program and it works perfectly!
Thanks for all
remember to /close when this issue has been solved @slycex
Oh ok !