You cannot use sockets, and there are no other way to communicate with other programs either. This is a restriction applied by Blizzard to prevent some forms of cheating, and to avoid malware propagation and other account security breaches.
In general you won't be able to communicate with third-party apps. There are workarounds, but they are hacks, they are likely to break in future updates of WoW, and they probably violate some terms of service.