whSwitching / TLSHandler

pure C# implementation of TLS 1.2/1.3
Apache License 2.0
31 stars 8 forks source link

Want to work with TCP socket without HTTP #4

Open arsium opened 2 months ago

arsium commented 2 months ago

Hello,

Firstly thx for the amazing code. I was wondering if it is possible to use with TCP client or raw tcp socket ?

whSwitching commented 2 months ago

@arsium TCP client, sure. recordHeader = read first 5 bytes recordBodyLength = ((recordHeader[3] << 8) + recordHeader[4]); recordBody = read recordBodyLength bytes for your reference then feed the record to TLSContext.Process_Record

arsium commented 1 month ago

Do you have a sample code ? That would be kind