IP地址问题 [英] Ip address Problem

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

问题描述

我正在开发聊天应用程序....使用c#.net 3.5
我想提供功能以将文件发送给在线用户...

我想使用套接字编程...因此我使用哪个IP地址,以便可以将文件发送给任何用户和任何位置...

请帮助我

i m developing chat application....using c#.net 3.5
i want to provide a functi0nality to send a file to online users...

and i want to use socket progromming...so which IPaddress i use so i can send a file to any user and any location...

pls help me

推荐答案

如果可以聊天,您已经建立了连接,因此可以立即将其作为多个包发送,接收者可以使用自定义协议识别它们邮件中的标题.没有特定的IP地址,这只是您定义数据的方式.您现在可能会显示收到的任何内容.因此,您必须更改它并添加添加接收方翻译的一些其他数据.在您的情况下,可以将其作为消息发送并显示在屏幕上,也可以存储为文件块.在发送文件之前,最好先发送一条消息,告知您将要发送文件的文件名和大小.然后,您的接收方客户端程序可以为其设置必要的处理程序,并且可以显示进度.

这是关于此的基本思想,非常简单.您可以根据需要将自己定义的程序包的复杂性设置为异国情调.

祝你好运!
You already have a connection if you can chat so you can send it right away as multiple packages that can be recognized by the receiver using self defined protocol headers in your messages. There is no specific ip address for it, it''s just how you define the data. You probably now show anything that is received. So you must change that and add add some additional data that is translated by the receiving party. In your case it can be dispatched as message and displayed on screen or stored as file chunk. Prior to sending a file it might be a good idea to first send a message that you are about to send a file, with that the file name and size. Your receiving client program can then setup the necessary handlers for it and you are able to show the progress.

This is the basic idea about this and is very simple. You can make the complexity of your own defined packages as exotic as you want.

Good luck!


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

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