Fix: Socket state after close() call is changed properly.
Add: Stubs for receiving segment with timeout
Add: packet are awaited only for certain time now and resent properly.