I originally thought that by moving the initialization code inside
connectionMade to dataReceived will solve the problem. However, while
testing the code, I found, say, after a Int32StringReceiver protocol is
constructed, it may directly call the sendString method. But at that
time, dataReceived is not invoked, so the protocol itself hasn't been
properly initialized.
That's is quite a dilemma. So we should abandon something?
We cannot guarantee which of the receive/send method is invoked first,
we also cannot put it into connectionMade as subclass might overwrite
this.