Added a socket write in one of the link.c functions. Need to check if
it works after SOCKET code implementation.