派位的Winsock [英] send bitmap with winsock

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

问题描述

你怎么能送过来的Winsock位图没有它保存到文件,然后发送了吗?这也将是有益的,如果你知道如何将数据被收到回位图转换后,

How could you send a bitmap over winsock without saving it to a file then sending that? It would also be helpful if you knew how to convert the data after being recieved back into a bitmap.

推荐答案

什么编程您使用的语言?

What programming language are you using?

基本上,你已经到了位图数据存储到某种字节的缓冲区中,然后发送字节通过线路,并在另一端读取位背出字节的缓冲区中。

Basically, you've got to store the bitmap data into some kind of byte buffer, then send the bytes over the wire, and read the bitmap back out of the byte buffer at the other end.

这样,有四个任务:


  • 保存位图来缓冲

  • 使用套接字跨线
  • 将数据写入

  • 使用套接字从线读取数据

  • 从缓存中加载位图

哪些任务特别是你是不是清楚?

Which tasks in particular are you not clear about?

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

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