After a period of time, a simple interactive information (Session) service suite of open-source development to finally come to an end.
Suite uses a simple interaction protocol to solve Http exchange information and collaborate across servers
Using Sid-Item (Key-Value) stored in the memory to maintain the form of the inner end of the service interaction information storage and retrieval
Protocol
This solution only Http server interactive information handling, so only a relatively simple protocol interaction identifier into operation, and access is provided.
Connection password authentication
Using the password PWD command to verify the connection, the connection password used to specify $, the command sent by the client are as follows:
PWD\r\n
$6\r\n
000000
Form number (failure) at the beginning of the command plus the relevant data is returned - after the server to receive a + sign (success) or Return
Examples of successful return (after the + number identification number is not the information-0):
+0\r\n
Example returns failure (- figures for the latter number of data bytes, the data was returned message):
-11\r\n
Invalid Pwd
Operating interaction identifier
Use interaction identifier SID command to set or apply for a new identity interaction, interaction identifier is specified using the @ commands sent by the client as follows:
Setting interaction identifier:
SID\r\n
@32\r\n
sdsdsd-sdjskdjskd-sdnskdsjdk0-sdsdj
Interactive application identification:
SID\r\n
@0\r\n
Form number (failure) at the beginning of the command plus the relevant data is returned - after the server to receive a + sign (success) or Return
Examples of successful return (+ number behind the digital data byte length, the data was returned interaction identifier in effect):
+32\r\n
sdsdsd-sdjskdjskd-sdnskdsjdk0-sdsdj
Example returns failure (- figures for the latter number of data bytes, the data was returned message):
-11\r\n
Invalid Sid
Key settings are stored
Storage key set using the SET command, the $ symbol set storage key name, using the storage key & specified, the client sends the following command:
SET\r\n
$4\r\n
name
&6\r\n
123456
Form number (failure) at the beginning of the command plus the relevant data is returned - after the server to receive a + sign (success) or Return
Examples of successful return (+ number behind the digital data byte length is a length of 0 indicates that data is not included):
+0\r\n
Example returns failure (- figures for the latter number of data bytes, the data was returned message):
-10\r\n
Unknow Sid
Get key storage
Use the GET command to get the storage key, use the $ symbol set storage key name, the command sent by the client as follows:
GET\r\n
$4\r\n
name
Form number (failure) at the beginning of the command plus the relevant data is returned - after the server to receive a + sign (success) or Return
Examples of successful return (+ number behind the digital data byte length to store the returned data key):
+6\r\n
123456
Example returns failure (- figures for the latter number of data bytes, the data was returned message):
-10\r\n
Unknow Sid
Get the source code
Exemplary server-side component and
Source code on GitHub open source, access address https://github.com/inmount/dotnet-core-simple-session-server
And exemplary client component
Source code on GitHub open source, access address https://github.com/inmount/dotnet-core-simple-session-client
Nuget quote
This component is currently supporting at Nuget warehouse download, VS / VS Code in can be downloaded by searching
Page for the server component Nuget https://www.nuget.org/packages/dotnet-core-simple-session-server/
The client component is Nuget page https://www.nuget.org/packages/dotnet-core-simple-session-client/
Welcome to download and upgrade recommendations put forward ^ _ ^