ObjFW  Diff

Differences From Artifact [86e7a28476]:

  • File src/OFDDPSocket.h — part of check-in [9c2f20e736] at 2022-11-03 00:14:27 on branch trunk — OFDDPSocket: Don't include the type with the data

    This seems to be an oddity limited to OSes that have implemented DDP
    exclusively for netatalk, while macOS and Windows don't include it with
    the data.

    While on macOS it's possible to achieve the previous behavior via some
    hacks, this is impossible on Windows, so the proper approach is to
    handle it like everybody else: Specify the protocol type when binding
    and only handle packets of the correct protocol type. (user: js, size: 3281) [annotate] [blame] [check-ins using] [more...]

To Artifact [0a178ce3d0]:


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 * @ref OFSocketAddressAppleTalkNode to get the AppleTalk node and
 * @ref OFSocketAddressAppleTalkPort to get the port (sometimes also called
 * socket number).
 *
 * @note On some systems, packets received with the wrong protocol type just
 *	 get filtered by the kernel, however, on other systems, the packet is
 *	 queued up and will raise an @ref OFReadFailedException with the
 *	 @ref errNo set to `ENOMSG` when being received.
 *
 * @warning Even though the OFCopying protocol is implemented, it does *not*
 *	    return an independent copy of the socket, but instead retains it.
 *	    This is so that the socket can be used as a key for a dictionary,
 *	    so context can be associated with a socket. Using a socket in more
 *	    than one thread at the same time is not thread-safe, even if copy
 *	    was called to create one "instance" for every thread!







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 * @ref OFSocketAddressAppleTalkNode to get the AppleTalk node and
 * @ref OFSocketAddressAppleTalkPort to get the port (sometimes also called
 * socket number).
 *
 * @note On some systems, packets received with the wrong protocol type just
 *	 get filtered by the kernel, however, on other systems, the packet is
 *	 queued up and will raise an @ref OFReadFailedException with the
 *	 @ref OFReadFailedException#errNo set to `ENOMSG` when being received.
 *
 * @warning Even though the OFCopying protocol is implemented, it does *not*
 *	    return an independent copy of the socket, but instead retains it.
 *	    This is so that the socket can be used as a key for a dictionary,
 *	    so context can be associated with a socket. Using a socket in more
 *	    than one thread at the same time is not thread-safe, even if copy
 *	    was called to create one "instance" for every thread!