...
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 Properties | PropertyId | PropertyValue | Description |
---|---|---|---|
SECURITY_ENABLED | 1 | boolean | Whether security is enabled at server |
DIFFIE_HELLMAN_KEY | 2 | byte[] | The server Diffie-Hellman key if the credential is required to encrypt. |
MAX_TIME_BETWEEN_CLIENT_PING | 3 | int32 | If 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.
ClientConfigRequest | 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 |
ClientConfigResponse –-> Success |
---|
Success => fixedSize = 1 byte, type = boolean |
Client Request Properties | PropertyId | PropertyValue | Description | |
---|---|---|---|---|
CLIENT_ID | 1 | string | 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_TIMEOUT | 2 | int32 | The client will wait for ClIENT_READ_TIMEOUT for server response. It's a optional property. | |
DIFFIE_HELLMAN_KEY | 3 | byte[] | 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 ) |
---|---|
NumberOfProperties | fixedSize = 2 bytes, type = int16 |
Propertyid | bytes |
PropertyValue | bytes |
EncrptedCredentials | bytes |
AuthResponse –-> Success |
---|
Success => fixedSize = 1 byte, type = boolean |
Examples
PutRequest
string regionName = "ExampleRegion"
...