我想通过调用一个使用多线程调用send服务的函数来以块的形式发送文件。以下是代码的简要介绍:byte[] fileBytes = ConvFileToByte("the pathe of the fileSendFile(ByteToSend, offset) // This call a method in a webservice.在这个函数中使用多线程的最佳方式是什么?
我正在做一个涉及通过TCP发送数据的项目。使用ThreadedTCPServer,我已经能够做到这一点。服务器线程只需要读取传入的数据字符串并设置变量的值。同时,我需要主线程来查看这些变量的变化值。到目前为止,这是我的代码,只是根据ThreadedTCPServer示例进行了修改:import threading dat