我有一个连接到服务器的程序,通过输入和输出数据流发送/接收数据。我想调试它,看看正在传递的消息是否正确,所以我必须读取通过流发送的消息,但连接有1秒超时。(在服务器端,我无法控制)有没有一种方法可以监听流,这样我就可以将数据从流中获取到控制台,并且仍然可以发送数据? //Some code to make the console write whatever is sent in the out stream
//And received in the in s
我只是在线程中使用普通的DataInputStream和DataOutputStream来接收、发送(在服务器上使用accept )来制作游戏,但它真的很慢。>5秒延迟。(dos为DataOutputStream)dos.writeFloat(dp.x);dos.writeFloat(dp.y);
dos = new D
, Int]],而是生成DataStream[Either[String, Int]] with Product with Serializable。我正在使用一些API,它确实接受DataStream[T],如果我传递给他们一个DataStream[T] with Product with Serializable,我就会得到一个编译时错误。]
* [error] required: org.apache.flink.streaming.api.scala.DataStream[Either[?, but c