mntone / RtmpClient

RtmpClient for Windows Runtime
Other
27 stars 10 forks source link

We change should be asynchronous method name like asynchronous method for Windows Runtime #2

Open qwerty2501 opened 10 years ago

qwerty2501 commented 10 years ago

RtmpClient have asynchronous methods. But it is not like asynchronous method for Windows Runtime. Developers will suffer the disadvantage of some in status quo.

  1. Developers of C# or VB can't await asynchronous methods of RtmpClient.
  2. Developers of all programming languages can't know of the exception in the asynchronous processing.

So, We change should be asynchronous method for RtmpClient to Windows Runtime style.

  1. Return IAsyncAction/IAsyncOperation.
  2. Change method name Windows Runtime style.

ex: Connect method name to ConnectAsync method name.

If you agree with this proposal, I will do this.

mntone commented 10 years ago

qwerty-san,

  1. Developers of C# or VB can't await asynchronous methods of RtmpClient.

Methods don’t have to wait process. Developers cannot care connection thread. It’s easy to program. (If async methods is opened, developers care threads around. Its development is not agile.)

  1. Developers of all programming languages can't know of the exception in the asynchronous processing.

Developers cannot care exception. When happened exception, connection thread abort. It indicate connection is closing.

qwerty2501 commented 10 years ago

mntone-san,

Methods don’t have to wait process. Developers cannot care connection thread. It’s easy to program. (If async methods is opened, developers care threads around. Its development is not agile.)

Developers should can decide to wait method, do not wait method. We decide is not. How they can know method completed? Certainly, Connect method can notify by events. But, it is not intuitive. And, developers not much care about IAsyncAction/IAsyncOperation .

Developers cannot care exception. When happened exception, connection thread abort. It indicate connection is closing.

No. Developers should care exception. Or else, They can not notify failure information to user. They should can decide notify or not notify.

Also, Internal StreamSocket throw exception when Connect. I guess application will abort at that time. However, I do not yet fully understand the current code. please answer in stride. And, if I am wrong I'm sorry.

Thanks.