Fixed the type_ids.md document
The byte format positions and lens for the PEER_INFO and MY_INFO type ids were fixed to properly reflect format(s). Few format changes to the code using the 'auto' keyword. This will be an ongoing thing on every commit until all parts of the code use the 'auto' keyword were appropriate.
This commit is contained in:
parent
6e068a8e83
commit
577784ad6f
|
@ -176,8 +176,8 @@ This carry some user account and session information about a peer client connect
|
|||
1. bytes[0-27] 28bytes - session id (224bit hash)
|
||||
2. bytes[28-59] 32bytes - user id (256bit hash)
|
||||
3. bytes[60-107] 48bytes - user name (TEXT - padded with 0x00)
|
||||
4. bytes[108-235] 128bytes - app name (TEXT - padded with 0x00)
|
||||
5. bytes[236-299] 64bytes - disp name (TEXT - padded with 0x00)
|
||||
4. bytes[108-241] 134bytes - app name (TEXT - padded with 0x00)
|
||||
5. bytes[242-305] 64bytes - disp name (TEXT - padded with 0x00)
|
||||
|
||||
notes:
|
||||
1. the session id is unique to the peer's session connection only. it
|
||||
|
@ -201,9 +201,9 @@ This contains all of the information found in ```PEER_INFO``` for the local sess
|
|||
|
||||
```
|
||||
format:
|
||||
1. bytes[300-427] 128bytes - email (TEXT - padded with 0x00)
|
||||
2. bytes[428-431] 4bytes - host rank (32bit unsigned int)
|
||||
3. bytes[432] 1byte - is email confirmed? (0x00 false, 0x01 true)
|
||||
1. bytes[306-433] 128bytes - email (TEXT - padded with 0x00)
|
||||
2. bytes[434-437] 4bytes - host rank (32bit unsigned int)
|
||||
3. bytes[438] 1byte - is email confirmed? (0x00 false, 0x01 true)
|
||||
```
|
||||
|
||||
```NEW_CMD```
|
||||
|
|
|
@ -310,7 +310,7 @@ void Session::dataFromClient()
|
|||
}
|
||||
else if (tcpSocket->bytesAvailable() >= FRAME_HEADER_SIZE)
|
||||
{
|
||||
QByteArray header = tcpSocket->read(FRAME_HEADER_SIZE);
|
||||
auto header = tcpSocket->read(FRAME_HEADER_SIZE);
|
||||
|
||||
tcpFrameType = static_cast<quint8>(header[0]);
|
||||
tcpFrameCmdId = static_cast<quint32>(rdInt(header.mid(1, 4)));
|
||||
|
@ -328,8 +328,9 @@ void Session::dataFromClient()
|
|||
{
|
||||
wrStringToBlock(fromTEXT(tcpSocket->read(BLKSIZE_APP_NAME)).trimmed(), appName, BLKSIZE_APP_NAME);
|
||||
|
||||
QString coName = fromTEXT(tcpSocket->read(272)).trimmed();
|
||||
QStringList ver = QCoreApplication::applicationVersion().split('.');
|
||||
auto coName = fromTEXT(tcpSocket->read(272)).trimmed();
|
||||
auto ver = QCoreApplication::applicationVersion().split('.');
|
||||
|
||||
QByteArray servHeader;
|
||||
|
||||
servHeader.append(wrInt(0, 8));
|
||||
|
@ -495,7 +496,7 @@ void Session::login(const QByteArray &uId)
|
|||
|
||||
void Session::sendLocalInfo()
|
||||
{
|
||||
QByteArray frame = createPeerInfoFrame();
|
||||
auto frame = createPeerInfoFrame();
|
||||
|
||||
Query db;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user