61
communication does not end until either end closes the connection or sends a null
character string.
Process Diagram of Server Program
2.
Client
It is easier to create a TCP client than to do a server. Take the following
pseudocode:
c
=
socket
( )
# Create a client socket.
c
.
connect
( )
# Try to connect a server.
comm_loop
:
# Communication loop.
c
.
send
( )/
c
.
recv
( )
# Dialog (sending out and receiving data)
c
.
close
( )
# Close the client socket.
As mentioned above, all sockets are created via the function
socket.socket( )
. Then,
the function
connect( )
can be called to connect the server. After the connection is
built, the dialog between the client and the server is enabled. When the dialog ends,
the client can close the socket and the connection.
Содержание Smart Video Car Kit
Страница 4: ...2 Components i Acrylic Plates ...
Страница 40: ...38 The whole picture of wiring should be like this ...
Страница 42: ...40 Now the circuit is completed Congratulations The car should be assembled successfully as shown below ...
Страница 65: ...63 Process Diagram of Client Program ...