Stacksrv is an implementation of a stack which works through TCP and meets the following requirements:
- stack should have
POP
andPUSH
operations POP
should block until stack has data- stack should work through TCP with protocol:
- first bit of an incoming message determines the command (
0
forPOP
and1
forPUSH
) - next
7
bits determines size of a payload (forPUSH
only) - following bytes is a payload.
- first bit of an incoming message determines the command (