a) Create Socket handle, compared with the PC, it does
not need the Socket, only the creation of local control
information (including SMS) and voice transmission the
creation of Socket
b) According to different Socket, set its corresponding
listening address and port respectively
c) Bind to each corresponding respectively Socket
handle
d) Listen to the corresponding intercepting Socket
e) Accept the corresponding client Socket connection
f) Listen to Socket and serial fd, timely response by the
customer or GPRS control information module requirement,
transmitted the responding treatment
g) Wait for PC control signal or a serial port
information, or to a PC or through a serial port on GPRS
module to undertake the corresponding processing
h) Different reading operation of the corresponding to
different Socket information on different processing, make
corresponding processing respectively
i) Continue circulation before returning the select
former , continue to wait for relevant information to make
corresponding processing
j) Until routine exits, close the whole communication
system.