Implement Socket natives

I think you only need to set the ondrain function inside the if block that throws VM.Pause below, although it doesn't hurt anything to set ondrain too often.