Two questions guys:

1) Let's say I use Read() on a socket with a buffer of size 1024 bytes. The sender sends only 4 bytes and then closes the connection. What will the status of the socket be and will the 4 bytes have been stored in the buffer?
Could the status of the socket be KErrDisconnected in this situation?

2) Can I create a descriptor like TBuf8 with the template number being a variable? For example, I know the following code is not valid:

int Read(RSocket * socket, int size) {
TBuf8<size> des;
...
}

Even if 'size' were 'const int' it still wouldn't be valid.
How could I circumvent this?

thnx