I'm using Network framework to do a simple TCP server.
When the TCP client send the data to me, nw_connection_receive handler, it give a parameter content which its type is dispatch_data_t.
I really no idea how to get the client's data from dispatch_data_t.
nw_connection_receive(connection, 1, 256, ^(dispatch_data_t _Nullable content, nw_content_context_t _Nullable context, bool is_complete, nw_error_t _Nullable error) {
// I want to get the data which client send to me from dispatch_data_t content.
});
Anyway, I did hate dispatch_data_t!!!!!!!!
When the TCP client send the data to me, nw_connection_receive handler, it give a parameter content which its type is dispatch_data_t.
I really no idea how to get the client's data from dispatch_data_t.
nw_connection_receive(connection, 1, 256, ^(dispatch_data_t _Nullable content, nw_content_context_t _Nullable context, bool is_complete, nw_error_t _Nullable error) {
// I want to get the data which client send to me from dispatch_data_t content.
});
Anyway, I did hate dispatch_data_t!!!!!!!!