api: document socket