search

Home  >  Q&A  >  body text

objective-c - 使用socket可以链接。传不过去数据

Objective-C
场景
使用socket可以链接。传不过去数据
具体问题
在ios中用socket怎样拼接数据。包头加包体形式。包头代表长度 包体就是数据。
这个知道怎么回事么

过去多啦不再A梦过去多啦不再A梦2772 days ago754

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-05-02 09:05:43

    Each request generates a uuid. In the returned data, it is judged by the uuid
    SOCKET has a long connection in the form of tcp, which requires heartbeat packet maintenance. There are also broken links in the form of UDP. I usually use tags to differentiate. TCP carries a tag when sending. UDP also needs to create multiple receivers, each with different tags. Welcome to join the IoT iOS communication group 499604323

    reply
    0
  • Cancelreply