Localize lsocket functions