NetworkStream锁定了吗? [英] NetworkStream Locks up?

查看:76
本文介绍了NetworkStream锁定了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了一个小型TCP聊天应用程序并对其进行了黑客攻击,以便可以在其上以字节形式发送图像.一切正常,服务器接收到正常的图像,之后网络流锁定.此后,客户端可以从服务器接收消息,但是客户端不能再将消息发送到服务器.有什么主意吗?


感谢您的答复.
我根本不会终止视频流.

I have downloaded a small TCP chat application and hacked it up so that I can send images in the form of bytes over it. Everything works alright and the server recieves the image fine, its just afterwards the network stream locks up. The client can recieve messages from the server after this, but the client can no longer send messages to the server. Any idea?


Thanks for the reply.
I am not terminating the stream at all. Could that be the problem?

推荐答案

您把它弄坏了.

发送图像后,您可以正确终止流.如果您正在使用阻塞调用来发送图像字节,则在完成时是否将其释放.

绝对是每个人都可以猜到的,而没有看到您如何破解了代码.
You broke it.

After the image is being sent are you terminating the stream correctly. If you are using a blocking call to send the image bytes, is it being released when it is finished.

Could be absolutely anyones guess, without seeing how you hacked the code.


这篇关于NetworkStream锁定了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆