Why would this be in a plug-in?
You can use the socket interface via socket class and I think Eugen made a wrapper in Xojo already?