function 'register' is not defined
The script has a few issues, first indentation seems not correct and seems to cause the error (could be caused by copy and paste). 

Python relies on the indentation of code because it doesn't use braces to separate code segments syntactically.

Before a class can be registered as an operator the class must be inherit from bpy.types.Operator or bpy.types.Menu (see the docs whether there're more options).

The socketserver constructor is not invoked.

Related:


https://stackoverflow.com/questions/3277367/how-does-pythons-super-work-with-multiple-inheritance
Blenders build-in text editor provides some examples of operators as Templates acessible from the Menu.