Skip to content

Repository files navigation

Base Socket Server

Created with C#.Net Core, i believe it will be the foundation of a powerful server application through your touch.

Reads and sends packet according to ASCII standards and disconnects socket connections that have not been authenticated after 30 seconds. a1 Socket connections that successfully received INS are not disconnected after 30 seconds, and the state structure manages data for each session.

NameSTXSend DatetimeSequence NumberTypePlace IDDevice IDINSMessage LengthDataCRC-16 ChecksumETX
Short NameSTXSendDTSEQTypePlaceIDDeviceIDINSMLVDCRCETX
Length(byte)17218222N21
Index18101119212325N25+N+125+N+1+1
FormatASCIIBCDHEXHEXHEXHEXHEXHEXHEXASCII

Header : STX, SendDT, SEQ, Type, PlaceID, DeviceID, INS, ML
Body : VD
Tail : CRC, ETX

The CRC-16 checksum algorithm uses ARC-CCITT.
❗ In order to commercialize this project, we will need to add the part that encrypts the packet.

Building

  • .Net Core 3.1

Build for ubuntu-18.04x64 : dotnet build --configuration Release --runtime ubuntu.18.04-x64 -p:ImportByWildcardBeforeSolution=false

Build for linux-x64 : dotnet build --configuration Release --runtime linux-x64 -p:ImportByWildcardBeforeSolution=false

Build for Windows : dotnet build --configuration Release

Dependencies Packages

  • MySql.Data v8.0.22 (Nuget)

About

Easy-to-customize projects that serve as the foundation for a powerful socket server.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages