您的位置:首页 > 理论基础 > 计算机网络

IdTCPServer

2015-08-19 23:38 876 查看
IdTCPServer1

Server本身就支持多线程,一个服务端连接多个客户端。

void __fastcall TForm2::IdTCPServer1Execute( TIdContext * AContext )
{
AContext->Binding->PeerIP;
AContext->Binding->PeerPort;

AContext->Connection->IOHandler->SendBufferSize;
AContext->Connection->IOHandler->Write( );
AContext->Connection->IOHandler->WriteFile( );
AContext->Connection->IOHandler->WriteDirect( );
AContext->Connection->IOHandler->WriteLn( );

AContext->Connection->IOHandler->Readable( );
AContext->Connection->IOHandler->ReadByte( );
AContext->Connection->IOHandler->ReadBytes( );
AContext->Connection->IOHandler->ReadChar( );
AContext->Connection->IOHandler->ReadStream( );
AContext->Connection->IOHandler->ReadString( );
AContext->Connection->IOHandler->ReadStrings( );
AContext->Connection->IOHandler->ReadInt16( );
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: