3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

server_socket_close()

Definition

server_socket_close(sock)

Features

This function terminates communication with the client. To reconnect to the client, the socket must be closed with server_socket_close(sock) and reopened.

Parameters

Parameter Name

Data Type

Default Value

Description

sock

socket.socket

-

Socket instance returned from server_socket_open()

socket instance

Return

Value

Description

0

Successful disconnection

Exception

Exception

Description

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

DR_Error (DR_ERROR_RUNTIME)

socket.error occurred during disconnection

Example

Python
sock = server_socket_open(20002)
# Opens the port 20002 and waits until the client connects. 
 
# do something… 
 
server_socket_close(sock) ) # Closes the connection to the client.

Keyword

server / server_ / socket / server_socket / server_socket_