lmaraite / tcp-server

Implementation of a TCP Socket Server for the BS1-Praktikum (TH Köln)
1 stars 0 forks source link

Enhancement/#8 implementation clientsession #28

Closed cvonder1 closed 3 years ago

cvonder1 commented 3 years ago

Adds implementation of the client session.

handleClient is unit tested, but not tested against real connections.

The "datenhaltung" layer will allocate space for the value string(here). This space is not freed in the clientSession. Currently I see the problem, that the value string might be set on a different way in the applicationLayer, so that it cannot be freed in a consistent way in the client session.\ Anyhow we should discuss where the space is freed.

The return value of the malloc call is not checked. I did not know what to return in an error case. Should I add a new exception to utils.h and return that accordingly?

The application layer header got also modified to use the defined structures Command and Result. Moreover the line endings were changed to LF. \ Please make sure to checkout the files with the correct line ending. This might help under Windows.

Resolves #8