User Tools

Site Tools


quickappconnectclass.htm
Navigation:  Language Reference > TCP/IP  Client/Server communications >QuickAppConnectClass Previous pageReturn to chapter overviewNext page

Overview

The QuickSocket class(es) provides methods for establishing socket connections and sending and receiving messages and/or data. The classes are found in the QuickSock.inc and QuickSock.clw files located in your ..\Libsrc\Win folder.

Example Usage:

See …\Examples\QuickSock\QuickChat.app

QuickAppConnectClass

This class provides framework for socket communications; messages and data.  The class uses the JSONDataClass to provide data exchange.

QuickAppConnectClass   CLASS(QuickSocketClass),TYPE,MODULE('QuickSock.CLW' ),LINK('QuickSock.CLW',_ABCLinkMode_),DLL(_ABCDllMode_)

JSON                     &JSONDataClass

JsonCmd                   LIKE(QuickSocketCmdGroup)

_NotifyOnConnection       BYTE,PROTECTED

CONSTRUCT                 PROCEDURE()

DESTRUCT                 PROCEDURE()

ConnectTo                 PROCEDURE(STRING pServerIp,LONG pPortNumber, STRING pUserName, STRING pUserPassword),LONG

Login                     PROCEDURE(STRING pUserName, STRING pUserPassword),LONG

SendServerResponse       PROCEDURE(LONG pToClientSocket, LONG pOriginalCommand, LONG pRetVal, STRING pRetMsg),LONG,PROC

RefreshNewConnectedUsers PROCEDURE(SOCKET newClientSocket),LONG,PROC,PROTECTED

SendMessage               PROCEDURE(STRING pToUserName, STRING pMsgText),LONG

SendNotify               PROCEDURE(STRING pToUserName, LONG pNotificationCode, STRING pMsgText),LONG

SendNotify               PROCEDURE(STRING pToUserName, LONG pNotificationCode, *GROUP pMsgContent),LONG

BroadcastNotify           PROCEDURE(LONG pNotificationCode, STRING pMsgText),LONG

BroadcastNotify           PROCEDURE(LONG pNotificationCode, *GROUP pMsgContent),LONG

BroadcastShutdown         PROCEDURE(LONG pNotificationCode, STRING pMsgText),LONG

! DoTakeWindowMessage is protected and calls the Event_* methods

DoTakeWindowMessage       PROCEDURE(LONG client,LONG request),DERIVED,PROTECTED

! All Event_* methods below are called by the DoTakeWindowMessage

Event_ServerResponse     PROCEDURE(LONG pOriginalCommand, LONG pRetVal, STRING pRetMsg),PROTECTED,VIRTUAL !Called in the client after a call to methods like Login, Message, Broadcast, etc. the info comes from the server response

Event_LoginOnServer       PROCEDURE(STRING pUserName, STRING pUserPassword, *BYTE pCancelOperation),PROTECTED,VIRTUAL

Event_Message             PROCEDURE(STRING pFromUserName, STRING pToUserName, STRING pMsgText),PROTECTED,VIRTUAL

Event_Notification       PROCEDURE(STRING pFromUserName, STRING pToUserName, LONG pNotificationCode, STRING pMsgText),PROTECTED,VIRTUAL

Event_BroadcastNotification PROCEDURE(STRING pFromUserName, LONG pNotificationCode, STRING pMsgText),PROTECTED,VIRTUAL

Event_BroadcastShutdown   PROCEDURE(STRING pFromUserName, LONG pNotificationCode, STRING pMsgText),PROTECTED,VIRTUAL

Event_NotifyCleanConnected PROCEDURE(),PROTECTED,VIRTUAL

Event_NotifyDisconnected PROCEDURE(STRING pUserName),PROTECTED,VIRTUAL

Event_NotifyConnected     PROCEDURE(STRING pUserName),PROTECTED,VIRTUAL

END

See also:

TCP Client/Server Communications

TCP Template Support

QuickAppConnectClass

quickappconnectclass.htm.txt · Last modified: 2021/04/15 15:57 (external edit)