Stanford NER tagger can be started listening to socket easily, which is documented as in the README file.
java -mx1000m -cp $HOME/resources/stanford/tagger/stanford-ner.jar edu.stanford.nlp.ie.NERServer -loadClassifier $HOME/resources/stanford/tagger/classifiers/english.all.3class.distsim.crf.ser.gz -port 1234
The POS tagger also has a built-in MaxentTaggerServer, however, we cannot directly use it.
java -mx1000m -classpath $HOME/resources/stanford/tagger/stanford-postagger.jar edu.stanford.nlp.tagger.maxent.MaxentTaggerServer -model $HOME/resources/stanford/tagger/models/english-bidirectional-distsim.tagger -port 1235