I am developing a secure chat-server, in which i have to send rsa keys across client and server. However, when i try to send a key, i only receive part of the key on the other side. I feel the problem is because of the small buffer size. My key is of 1024 bit long. It is a RSA public key.
After googling, i came across two functions in the socket class:
socket.setReceiveBufferSize() and socket.setSendBufferSize().
Even after setting the buffer size, i am getting the same result.