Updated net code

Adding support for disconnect recognition