Solvline PB2xxxUG User Manual

Page 101

Advertising
background image

instance, socket 4002 is connected to socket 2.

The server’s waiting sequence for connection requests from client

socket() -----– Create a socket object.
|
bind() ------ Announce the program is ready for communication.
|
listen() ----- Wait for connection request from client..
|
read() ------- Wait until the client requests a sendto.
|
write() ------- Send a HTML file and others in response to the request from client.

2) Active Programming

If you set the handshaking method to active in the Webpage Connection Setting, the socket acts in
Active mode.
Active handshaking makes the Portbase serial ports be on the client side trying to connect to the
remote client’s IP address and socket number.
If the Portbase has started completely, you can see that sockets 4001 to 4016 are automatically
connected to serial ports 1 to 16 serial ports.

Connection Request Sequence from client to server


socket() – --- Create a socket object.
|
connect() -- Request for connection to server.
|
write()- –-- Send a HTML file and others in response to the request from server.
|
read()----Wait until the server requests a sendto.

3) Operation Environment

O/S : Linux or Unix
Tool : Linux or Unix Compiler

4) Result (Active Programming)

101

Advertising