rsocket / rsocket-cpp

C++ implementation of RSocket
http://rsocket.io
Apache License 2.0
253 stars 99 forks source link

ColdResumeHandler should be nullptr as its not to be used in default #817

Closed phoad closed 6 years ago

phoad commented 6 years ago

When the coldResumeHandler is not null, the handleUnknownStream function uses this object to save a token and some states.

In default, we don't need this functionality, so it should be assigned to nullptr at the constructor's default parameters. Why to pay the cost if we don't want to use it.

For FireAndForget, we don't need to create/register any stream. Don't pay the cost of creating a stream even though we will not use it.

phoad commented 6 years ago

I have already updated the project which requires this parameter to be nullptr, to pass nullptr for that parameter. So let me close this diff without landing.