Change the FakeSocket to be record-oriented

That is how Online uses the sockets for communication between the
processes anyway: It send and receives complete WebSocket frames.
Sure, in the mobile case there is just one process, but (I think) we
want to keep the same basic structure anyway, even if "wsd" and "kit"
are just threads. (We probably also want to drop the WebSocket framing
of the messages.)

Change-Id: I2397f321029c1cbbbc448a9b2403ad185a51cf14
This commit is contained in:
Tor Lillqvist
2018-09-14 10:49:58 +03:00
committed by Tor Lillqvist
parent 6d81ebcfeb
commit 55a2f804a6
3 changed files with 41 additions and 21 deletions

View File

@ -33,6 +33,8 @@ int fakeSocketConnect(int fd1, int fd2);
int fakeSocketAccept4(int fd, struct sockaddr *addr, socklen_t *addrlen, int flags);
ssize_t fakeSocketAvailableDataLength(int fd);
ssize_t fakeSocketRead(int fd, void *buf, size_t nbytes);
ssize_t fakeSocketWrite(int fd, const void *buf, size_t nbytes);