Einzelnen Beitrag anzeigen

mytbo

Registriert seit: 8. Jan 2007
458 Beiträge
 
#17

AW: Einfaches Kommunikationsprogramm

  Alt 23. Feb 2021, 13:32
Dieses mORMot kann man wohl nur mit mORMot verwenden.
Allein folgendes "Client.WebSocketsUpgrade(PROJECT31_TRANSMISSION_K EY)"
mORMot kann nicht nur mit sich selbst kommunizieren, verwendet aber als Default oft optimierte Einstellungen für die interne Nutzung.

Die Beschreibung zur Funktion WebSocketsUpgrade() der verwendeten Klasse erklärt dein Problem. In der Hilfe steht folgendes:
Code:
/// upgrade the HTTP client connection to a specified WebSockets protocol
// - the Model.Root URI will be used for upgrade
// - if aWebSocketsAJAX equals default FALSE, it will use 'synopsebinary'
// i.e. TWebSocketProtocolBinaryprotocol, with AES-CFB 256 bits encryption
// if the encryption key text is not '' and optional SynLZ compression
// - if aWebSocketsAJAX is TRUE, it will register the slower and less secure
// 'synopsejson' mode, i.e. TWebSocketProtocolJSON (to be used for AJAX
// debugging/test purposes only)
// and aWebSocketsEncryptionKey/aWebSocketsCompression parameters won't be used
// - once upgraded, the client would automatically re-upgrade any new
// HTTP client link on automatic reconnection, so that use of this class
// should be not tied to a particular TCP/IP socket - use OnWebsocketsUpgraded
// event to perform any needed initialization set, e.g. SOA real-time
// callbacks registration
// - will return '' on success, or an error message on failure
Die Beschreibung findest du in der Unit mORMotHttpClient oder der Hilfe. Suche einfach im mORMot Quelltext nach WebSocketsUpgrade() und lese die Hilfe zu den einzelnen Implementierungen. Die Hilfe ist umfangreich und beschreibt vieles sehr ausführlich.

Einen Blog Artikel über die Verwendung von WebSockets in TMS WebCore habe ich hier gefunden. Vielleicht hilft es dir weiter.

Bis bald...
Thomas
  Mit Zitat antworten Zitat