add server function socket and bind and accept and listen for return of select