我们重建了每个客户服务器的星座,并陷入了问题。 我们希望永远准备好读写或写。 目前,我们采用正在阻碍的袖珍读法,因此,我们不能发出任何书面要求。
- is there a way to interrupt the read operation?
- perhaps it s better to have the main server thread responsible for writing to the socket?
如果是的话,它是否仍然符合每个客户设计模式的校对?
我们重建了每个客户服务器的星座,并陷入了问题。 我们希望永远准备好读写或写。 目前,我们采用正在阻碍的袖珍读法,因此,我们不能发出任何书面要求。
如果是的话,它是否仍然符合每个客户设计模式的校对?
或许,你应当使用单独的透镜,一只读,一只书写,使用某种同步方法(例如,与双向透镜共用缓冲器),在两者之间进行沟通。 此外,<条码>选取条码> 可使用电话了解是否有任何数据有待填写。
<>Update>
最初,我想到的是<代码>选择()功能,可向C. Oh well打电话。
我在贾瓦森文中可以发现的最近一点是: > 代码>Socket.getInputStream(>,这使你有一个可以测试的溪流,以确定是否有tes可供阅读或无法从背书上查阅。
使用同步(非锁定)的IO。 或者,你也可以使用单独的读写法。
保证记要不是锁定的(我认为FIONBIO)。 并且使用<条码>电子数据代码>来确定数据何时可以读。
Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...
Check this, List<String> list = new ArrayList<String>(); for (int i = 0; i < 10000; i++) { String value = (""+UUID.randomUUID().getLeastSignificantBits()).substring(3, ...
I am in the middle of solving a problem where I think it s best suited for a decorator and a state pattern. The high level setting is something like a sandwich maker and dispenser, where I have a set ...
I have been trying to execute a MS SQL Server stored procedure via JDBC today and have been unsuccessful thus far. The stored procedure has 1 input and 1 output parameter. With every combination I ...
I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...
If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...
I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....
I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...