ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput | register your nick to speak
Lucretia has quit [Read error: Connection reset by peer]
Lucretia has joined #wayland
ybogdano has quit [Ping timeout: 480 seconds]
sav10 has quit [Read error: No route to host]
Seirdy has quit [Ping timeout: 480 seconds]
Seirdy has joined #wayland
cvmn has joined #wayland
<DemiMarie>
smallville7123: I still think that ALPC is the only viable approach, even though it is undocumented.
co1umbarius has joined #wayland
columbarius has quit [Ping timeout: 480 seconds]
cvmn has quit [Ping timeout: 480 seconds]
cool110 has quit [Ping timeout: 480 seconds]
cool110 has joined #wayland
cool110 has quit [Remote host closed the connection]
cool110 has joined #wayland
agd5f has quit [Ping timeout: 480 seconds]
yoslin has quit [Ping timeout: 480 seconds]
mackerelian9 has quit []
smallville7123 has joined #wayland
<smallville7123>
yea but we need to get wayland to compile successfully first (mainly get the socket communication working successfully)
<smallville7123>
as there not much point if the socket's are broken lol
<smallville7123>
to send and recieve connection->out would we send the iov struct ?
<smallville7123>
as the only other way i can see it working without sendmsg is to manually iterate the out ringbuffer byte-by-byte and send each byte for the recepient to put into the in ringbuffer byte by byte
<smallville7123>
eg SEND_TOTAL_BYTES(connection); ITERATE_RB(connection->out, byte) do { len = send(connection->fd, byte, sizeof(char), 0); } while (len == SOCKET_ERROR && WSAGetLastError() == WSAEINTR);
<smallville7123>
GET_TOTAL_BYTES(connection, bytes); char byte; for(size_t r = 0; r < bytes;) { while(true) { len = recv(connection->fd, &byte, sizeof(char), 0); if (len == SOCKET_ERROR && WSAGetLastError() == WSAEINTR) continue; r++; ring_buffer_put(&connection->in, &byte, sizeof(char)); } }
<smallville7123>
errr the while(true) loop shouldnt be there as the for loop is effectively doing the same thing as while(r < bytes)
<smallville7123>
if only winsocks has sendmsg i could just leave the existing send/read code alone and not have to worry about it breaking on windows ;-;
<smallville7123>
pq: what does size = cmsg->cmsg_len - CMSG_LEN(0); mean in decode_cmsg
<smallville7123>
eg size = cmsg->cmsg_len - CMSG_LEN(0); max = sizeof(buffer->data) - ring_buffer_size(buffer); if (size > max || overflow) {
<smallville7123>
would it simply mean that we are checking if we have enough space in the ringbuffer to store the current piece of data?
<smallville7123>
tho, in that case wouldnt size = sizeof(int32_t); be equivilant since the CMSG only gets decoded if it contains SCM_RIGHTS which is used for transferring descriptors ?
<smallville7123>
or would size be the total size of all the sent descriptors in the current CMSG header ?