Probably the most equivalent existing open source thing out there is ENet, which doesn't do encryption or detailed stats. If you've signed the steam NDA (which is free of charge iirc) you can check out the existing docs for the closed source version, which has extra features on top of this.