kerryjiang / SuperSocket.ClientEngine

A .NET library which can make your socket client development easier
366 stars 197 forks source link

ConnectAsync implementation fix for Ubuntu 18.04 #106

Open jhabjan opened 5 years ago

jhabjan commented 5 years ago

ConnectAsync was not implemented properly and as result, callback (Complete event) was never triggered (on Ubuntu) when called from sync code and code never got to the handshake point. ConnectAsync returns boolean (true if the I/O operation is pending. The Completed event on the e parameter will be raised upon completion of the operation, false if the I/O operation completed synchronously. In this case, The Completed event on the e parameter will not be raised and the e object passed as a parameter may be examined immediately after the method call returns to retrieve the result of the operation.)