Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PutRequest => RegionName Key CallbackArg Value
RegionName => (variable size, type = String)
Key => bytes
CallbackArg =>  bytes 
Value => defined above

PutResponse

PutResponse –-=> Success
Success => fixedSize = 1 byte, type = boolean

...

The purpose of metadata to pass defined key value pair with request and response. That will be optional for client. If there is any metadata associated with request or response, then need to set "hasMetadata" flag to "true" in request or response header. After that send metadata in following format.

 

MetaData => NumberOfMetadata MatadataKeyId MetadataKeyValue { MatadataKeyId MetadataKeyValue}
NumberOfMetadata=> fixedSize = 2 bytes, type = int16
MatadataKeyId => fixedSize = 2 bytes, type = int16
MetadataKeyValue => variable, Value as defined in table below

 

We would have following pre-defined key and value for metadata. Note this list will grow over time.

...

The purpose of ServerConfigRequest request to get server config from the server. The client needs to send this request after connecting to the server. If the client knows server properties, then there is no need to send this request.

 

ServerConfigRequest NumberOfProperties => {}
ServerConfigResponse =>NumberOfProperties PropertyId PropertyValue{ PropertyId PropertyValue}
NumberOfProperties => fixedSize = 2 bytes, type = int16
Propertyid => fixedSize = 2 bytes, type = int16
PropertyValue => variable, Value as defined in table below
Server Response PropertiesPropertyIdPropertyValueDescription
SECURITY_ENABLED1booleanWhether security is enabled at server
DIFFIE_HELLMAN_KEY2byte[]The server Diffie-Hellman key if the credential is required to encrypt.
MAX_TIME_BETWEEN_CLIENT_PING3int32If the client connection is idle for MAX_TIME_BETWEEN_CLIENT_PING seconds then the server will close that connection.

...


ClientConfigRequest

The Purpose of ClientConfigRequest request to send client config to a server. The client needs to send this request after connecting to the server. 

ClientConfigRequestNumberOfProperties PropertyId PropertyValue{ PropertyId PropertyValue}
NumberOfPropertiesfixedSize = 2 bytes, type = int16
PropertyidfixedSize = 2 bytes, type = int16
PropertyValuevariable, Value as defined in table below
ClientConfigResponse –-> Success
Success => fixedSize = 1 byte, type = boolean
Client Request PropertiesPropertyIdPropertyValueDescription 
CLIENT_ID1string

Unique id for the client; if client doesn't send this property then server

will just create id (client-host, client-port, server-host, server-port).

 
ClIENT_READ_TIMEOUT2int32

The client will wait for ClIENT_READ_TIMEOUT for server response. It's a optional

property.

 
DIFFIE_HELLMAN_KEY3byte[]

The client Diffie-Hellman key if the credential is required to encrypt. If server

has enabled Diffie-Hellman then client must send this to server.

 

...

AuthRequest

( NumberOfProperties PropertyId PropertyValue{ PropertyId PropertyValue}

| NumberOfEncryptedBytes EncryptedCredentials )

NumberOfPropertiesfixedSize = 2 bytes, type = int16
Propertyidbytes
PropertyValuebytes
EncrptedCredentialsbytes
AuthResponse –-> Success
Success => fixedSize = 1 byte, type = boolean


Examples

PutRequest

string regionName = "ExampleRegion"

...