Finished basic part of socket communication.