像Yahoo Messenger一样写Messenger [英] Writing Messenger Like Yahoo Messenger

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

问题描述

大家好
我要写像Yahoo Messenger那样的信使,该信使可以在Internet上工作.
因此,我在最近的几个月中学习了套接字编程.
我编写了两种程序(C#.net 2010中的Windows应用程序)
1.客户端版本:在特定端口上发送和接收数据.
2.Server版本:侦听此端口并回答来自客户端版本的数据并将数据路由到另一个客户端.(例如yahoo Messenger)
但是这些程序可以在LAN网络中使用.

对于其他程序,我的程序具有用于对话日志和...的数据库.

我问题的重要部分是:
我如何更改程序以在Internet连接上工作?

非常感谢.
javad naroogheh.

hello every body
i going to writing messenger like yahoo messenger that work on internet .
for this reason i learn socket programming in some last months.
i wrote two type of my program (windows application in C#.net 2010)
1. client version: that send and receive data on a special port.
2.Server Version :that listening to this port and answer to data that come from Client version and route data to another client.(like yahoo Messenger)
but these program work in LAN networks.

for additional my program has a Data base for conversation LOGs and...

the important part of my question is:
how i change my program to work on internet connections?

thank you very much.
javad naroogheh.

推荐答案

不需要更改,除了IP地址(无论如何,您都不应对其进行硬编码).您的服务部件及其IP地址和端口,应该对Internet可见,仅此而已.例如,如果您正在使用防火墙,则应将其配置为允许使用您的协议或端口进行通信.这些细节与您的代码本身无关.

—SA
No change is needed, except, perhaps, IP addresses (which you should never hard-code, anyway). Your service part, with its IP address and port, should be visible to Internet, that''s it. For example, if you have firewalls on the way, they should be configured to allow the traffic with your protocol or port. Those are detail not related to your code itself.

—SA


这篇关于像Yahoo Messenger一样写Messenger的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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