0

After I connected to ws when I try to send message to server it throw exception. I have tried that lots of diffirent way (with async, in xamarin.forms aplication). I am always getting same issue.Any idea what is a problem?

Example

Edit: Problem has solved. I checked connection status with "Console.WriteLine(conn.State)" I seen that it was still connecting so after connection method I have applied time delay "System.Threading.Thread.Sleep(2000)" and problem has solved. So Problem occur because of uncompleted connection.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
  • Are you sure the connection completed? Check the connection status from cmd.exe >Netstat -a – jdweng Oct 15 '20 at 10:33
  • I checked connection status with "Console.WriteLine(conn.State)" I seen that it was still connecting so after connection method I have applied time delay "System.Threading.Thread.Sleep(2000)" and problem has solved. So Problem occur because of uncompleted connection. Thanks. – Omer Savran Oct 15 '20 at 16:27

0 Answers0