RobotIq 2F-85 Gripper Socket Communication to Control Gripper

I’d like to get help with how to control the gripper through robotic TQ 2F-85 gripper socket communication

Attached is the source code below
Is there anything I need to revise?