开发者

How To send Array or vector (has contact list ) from IdTCPServer to IdTCPClient (indy10)

1) Now I am writing IM chat System i face some problem how to send开发者_StackOverflow中文版 vector that has information from the server to Client

2) is any way to communicate between tow client ??

I Use CBC2010 - Indy10


Basically communicating over TCP is about sending bytes from client to server, and receiving bytes on the client from the server.

You either can give meaning to those bytes, or have something wrap that for you.

There are many possibilities and protocols to choose from.

On the foundation, you have either UDP (which is unreliable, but incurs almost no overhead, but very well suited for broadcasts) and TCP (which is more reliable, therefore has more overhead, but is easier to use).

A transport protocol that is often used on top of TCP is HTTP, especially since it is easy to get it through proxy servers.

On top of that you can do XML+SOAP or JSON+REST, which make translating from/to your underlying objects a lot easier.

All in all there are a truckload of options to choose from.

A simple start is the Delphi chat example at delphi.about.com. That definitely should get you going.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜