Read from socket

后端 未结 5 1061
遥遥无期
遥遥无期 2020-12-31 10:08

I need to read from an AF_UNIX socket to a buffer using the function read from C, but I don\'t know the buffer size.

I think the best way is to read

5条回答
  •  别那么骄傲
    2020-12-31 10:26

    you are correct, if you don't know the size of the input you can just read one byte each time and append it to a larger buffer.

提交回复
热议问题