If i use the low level socket to get information from a web database i break adobe EULA?
Your question is unclear, more details are good.
In general, we are not lawyers, and are not qualified to answer legal questions. I am not a lawyer.
That said, the usual part of the EULA that causes confusion and surprise is Section 2.4: Server Use; I see no reason why that would restrict accessing databases from InDesign.
The reverse is problematic though; if your database attempts to access InDesign in an automated fashion, that would be problematic.
Retrieving data ...