Is there any requirements to do socket programming with WordPress?

The answer is “No”, there is nothing in wordpress that may interfere with usage of PHP socket API.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)