那位大哥能提供有关使用TIdIRCServer的代码,300分~~~~~~~~~~~~~~~~~~~~~~~

richincsdn2 2002-01-23 05:30:15
谢谢,如果没有, 提供 有关 TId*Server 的代码也行
...全文
135 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
gybcb 2002-01-25
  • 打赏
  • 举报
回复
TIdIRCServer我具体也没有用过,不过我看了一下帮助!!
我觉得,TIdIRCServer是用TIdTCPClient来连接的!!
然后,通过TIdTCPClient给TIdIRCServer发送消息,然后TIdIRCServer根据相应的命令来执行一定的操作!!以下是TIdIRCServer的帮助。
具体的帮助你可以上
http://www.nevrona.com/Indy/
去下载!!
Specifies an Internet Relay Chat Protocol server.

TIdIRCServer = class(TIdTCPServer)

Description

TIdIRCServer is a TIdTCPServer descendant that provides a server implementation of the Internet Relay Chat (IRC) Protocol as described in the Internet Standards document:

Internet Relay Chat Protocol (IRC), RFC 1459, by J. Oikarinen and D. Reed, May 1993


The IRC protocol provides users with a way to chat among themselves in "chat rooms". The IRC protocol is a text-based conferencing protocol that uses TCP/IP as the network transport.

A typical IRC environment involves a single process (the server) that forms a central point for client (or other server) connections, performing the required message delivery/multiplexing and other functions. IRC allows various forms of message delivery including user-to-user, user-to-list, user-to-group, user-to-server, and server-to-server communication modes.

The only network configuration allowed for IRC servers is that of a spanning tree where each server acts as a central node for the rest of the network visible to the server.

An IRC client can be any socket-enable application capable of connecting to an IRC server that is not already an IRC server.

TIdIRCServer uses the standard port number IdPORT_IRC reserved for the IRC protocol to listen for client connections. TIdIRCServer, like TIdTCPServer, is a multithreaded application where new connections are respresented by a TIdPeerThread that is serviced by the TIdIRCServer.

TIdIRCServer recognizes the following IRC commands as defined in the RFC specification:

ADMIN
AWAY
CONNECT
ERROR
INFO
INVITE
ISON
JOIN
KICK
KILL
LINKS
LIST
MODE
NAMES
NICK
NOTICE
OPER
PART
PASS
PING
PONG
PRIVMSG
QUIT
REHASH
RESTART
SERVER

SQUIT
STATS
SUMMON
TIME
TOPIC
TRACE
USER
USERHOST
USERS
VERSION
WALLOPS
WHO
WHOIS
WHOWAS


TIdIRCServer provides an event handler architecture for all IRC commands that allow the IRC server application to determine the appropriate mechanism used to respond to an IRC command. TIdIRCServer does not provide an implementation for the event handlers.
richincsdn2 2002-01-24
  • 打赏
  • 举报
回复
看不懂啊,远程连接的IP,PORT怎么设呢?
gybcb 2002-01-24
  • 打赏
  • 举报
回复
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "IdAntiFreeze"
#pragma link "IdAntiFreezeBase"
#pragma link "IdBaseComponent"
#pragma link "IdComponent"
#pragma link "IdUDPBase"
#pragma link "IdUDPClient"
#pragma link "IdUDPServer"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
IdUDPClient1->Send(Edit1->Text);
Memo1->Lines->Add(Edit1->Text);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::IdUDPServer1UDPRead(TObject *Sender,
TStream *AData, TIdSocketHandle *ABinding)
{
TStringStream *aa;
aa = new TStringStream("");
aa->CopyFrom(AData,AData->Size);
Memo1->Lines->Add(aa->DataString);
delete aa;
}
//---------------------------------------------------------------------------
richincsdn2 2002-01-24
  • 打赏
  • 举报
回复
收到拉!!!!!不过我发现TId*Server 的组件只能编服务端的程序,是这样么????
gybcb 2002-01-24
  • 打赏
  • 举报
回复
to richincsdn2
已发送,请查收!!
好运
gybcb 2002-01-24
  • 打赏
  • 举报
回复
留个EMail我给你发个例子过去!!
invalid 2002-01-23
  • 打赏
  • 举报
回复
哦,看错了。我没有TIdIRCServer的使用代码。
不过你要TId*Server的代码可以在:

名称:CBDemos20010311.zip
URL:http://www.nevrona.com/indy/downloads/CBDemos20010311.zip
大小: 404KB
完成时间:Wed Jan 23 13:25:48 2002
引用页:http://www.nevrona.com/indy/download80.html
注释:CBDemos20010311.zip
下载,
其中有
Chat\Server\ServerFrm.cpp(106): //Set the TIdTCPServer's port to the chosen value
Chat\Server\ServerFrm.h(72): TIdTCPServer *tcpServer;
BasicClientServer\frmServer.h(19): TIdTCPServer *IdTCPServer;
Finger\FingerServer\FingerServFrm.h(18): TIdFingerServer *IdFingerServer1;
ImageServer\Server\frmMain.h(19): TIdTCPServer *IdTCPServer;
TimeDemo\TimeServer\frmMain.h(18): TIdTimeServer *IdTimeServer1;
TrivialFTPDemo\TFTPServer\frmTFTPServer.h(59): TIdTrivialFTPServer *IdTrivialFTPServer1;
ZipCodeLookUp\WSZipCodeServerUnit.cpp(33): TIdTCPServerConnection& conx( *AThread->Connection );
ZipCodeLookUp\WSZipCodeServerUnit.h(17): TIdTCPServer *IdTCPServer1;
QOTD\Server\frmMain.h(18): TIdQOTDServer *IdQOTDServer1;

的代码例子。
richincsdn2 2002-01-23
  • 打赏
  • 举报
回复
superlxf@hotmail.com
richincsdn2 2002-01-23
  • 打赏
  • 举报
回复
to : invalid(空心菜) 

这些我都有啊!!!!!我要它的使用方法
invalid 2002-01-23
  • 打赏
  • 举报
回复
我也可以发给你。IdIrcServer.pas,16k。邮箱?
invalid 2002-01-23
  • 打赏
  • 举报
回复
名称:indy8_00_23.zip
URL:http://www.nevrona.com/indy/downloads/indy8_00_23.zip
大小: 389KB
完成时间:Wed Jan 23 13:24:31 2002
引用页:http://www.nevrona.com/indy/download80.html
注释:indy8_00_23.zip
下载后有源代码。有你要的东西。还有Indy的帮助。
才300多k
richincsdn2 2002-01-23
  • 打赏
  • 举报
回复
救我啊!!!!!!!!!!!!!!!!
gfh21cn 2002-01-23
  • 打赏
  • 举报
回复
不懂,关注关注
richincsdn2 2002-01-23
  • 打赏
  • 举报
回复
indy servers 里面的东东
Wingsun 2002-01-23
  • 打赏
  • 举报
回复
这是什么?

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧