I have build a simple application that opens a ServerSocket, and on connection, it connects itself to another server socket on a remote machine. To implement port forwarding
If your code isn't performant, maybe your buffers aren't large enough.
Too small buffers mean that more request will be done and less performances.