PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Communication channel
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Run on the server, this function accepts a request for connecting to an existing socket found on the server. This function is used to create the communication channel between the server socket and the client socket.
This allows you to create a different communication channel for each client computer. Each one of these communication channels can be handled in an independent thread.
Remarks:
  • If the client computer is using a WINDEV application to connect to this socket, this application will have to use SocketConnect.
  • SocketAccept can be used with the SSL sockets.
  • SocketAccept cannot be used with a UDP socket.
WEBDEV - Server code To use the sockets on the server, check "Allow the server sockets" in the "Advanced" tab of the WEBDEV administrator.
Reminder: A socket is a communication resource used by applications to communicate from one computer to another regardless of the type of network.
Versions 19 and later
Linux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
New in version 19
Linux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
Linux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
Example
WEBDEV - Server codePHPAjax
// Creates a socket on the server
IF SocketCreate("Server", 8000) = False THEN
Error("Creation error " + ErrorInfo(errMessage))
ELSE
// Manage the connections of the client computers in a thread
ThreadExecute("Thread1", threadNormal, WaitProcedure)
END
// ------------------------------------------------------
PROCEDURE WaitProcedure()
LOOP
IF SocketWaitForConnection("Server") = True THEN
Channel is string
// If the connection is accepted,
// this connection is managed in a specific thread
Channel = SocketAccept("Server")
ThreadExecute(Channel, threadNormal, ProcedureManagement, Channel)
END
END
Syntax
<Result> = SocketAccept(<Socket name>)
<Result>: Character string
  • Name of the communication channel to the client socket that requested the connection. This name will be used by all the other Socket functions to specify this communication channel.
  • Empty string ("") if an error occurred. To get the details of the error, use ErrorInfo.
<Socket name>: Character string
Name of the server socket that accepts the connection.
Remarks

Communication channel

The communication channel opened by SocketAccept must be closed by SocketClose.
Component: wd270com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment