Socket function

Bridged connection between for form POST and tree classifier.