PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Communication channel
  • Required permissions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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.
Notes:
  • 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.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Reminder: A socket is a communication resource used by the applications to communicate between computers regardless of the network type.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Versions 19 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 19
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 23 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 23
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
WINDEVWEBDEV - Server codeReports and QueriesWindows MobilePHPAjaxUser code (UMC)
// 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 find out the error details, use ErrorInfo.
<Socket Name>: Character string (with quotes)
Name of the server socket that accepts the connection.
WINDEV Caution: The socket name is case sensitive.
Remarks

Communication channel

The communication channel opened by SocketAccept must be closed by SocketClose.
AndroidAndroid Widget

Required permissions

The call to this function modifies the permissions required by the application.
Required permission : INTERNET
This permission allows the applications to open the network sockets.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Java wd230java.jar
Linux wd230com.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment