从websocket服务器(用c#/vb.net编写)接收数据作为图像 [英] Receive data from websocket server (written in c#/vb.net) as image

查看:309
本文介绍了从websocket服务器(用c#/vb.net编写)接收数据作为图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对网络套接字有点陌生, 我学到了简单易用的客户端代码(使用JavaScript)

I'm kind of new in the websocket, I learned the client-side code (in JavaScript) which is simple and easy,

但是当我搜索websocket服务器时,代码很复杂(尤其是在c#中), 现在我需要一个websocket服务器代码(在c#或vb.net中),该代码将一些消息返回到客户端(可以是诸如"hello client"之类的字符串)作为示例,并在可能的情况下在代码中进行一些解释, 而且我还需要服务器上的一些代码来将文件(例如.jpg)发送到客户端(如果可能)

but when I search the websocket server, the code is complicated (especially in c#), and now I need a websocket server code (in c# or vb.net) that return some message to the client side (can be a string like "hello client") as an example and if possible with some explanation in the code, and furthermore I also need some code for the server to send file (like .jpg) to the client side (if it's possible)

有什么主意吗?或者如果您有很好的参考,我愿意接受, 谢谢

any idea? or if you have a good reference, I'm open to it, Thanks

推荐答案

在我的一个项目中,我正在使用 SuperWebSocket 作为.NET WebSocket服务器.还包括一些示例(我想也是一个简单的echo示例,该示例从客户端返回接收到的字符串).

In one of my projects, I'm using the SuperWebSocket as .NET WebSocket server. There are also some examples included (I think also a simple echo example, which returns the received string from a client).

我尚未发送图片,因此无法提供此问题的代码.

I havn't sent an image yet, so I can't provide code for this problem.

如果您还需要.NET WebSocket客户端,则可以使用 WebSocket4Net

If you also need a .NET WebSocket client, you can use WebSocket4Net

这篇关于从websocket服务器(用c#/vb.net编写)接收数据作为图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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