"self" refers to the object that the func is contained in.
But your code shows no such object.
Perhaps you have you omitted the crucial code?
...but if these funcs are global, then there is indeed no "self".
Topic:
App & System Services
SubTopic:
Networking
Tags: